Skip to content

Commit

Permalink
Merge pull request #38 from myii/chore/standardise-structure
Browse files Browse the repository at this point in the history
feat(yamllint): include for this repo and apply rules throughout
  • Loading branch information
aboe76 authored Aug 17, 2019
2 parents 55eef18 + 073f66e commit c6a7788
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 23 deletions.
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---
stages:
- test
- commitlint
- lint
- name: release
if: branch = master AND type != pull_request

Expand Down Expand Up @@ -45,16 +45,21 @@ script:

jobs:
include:
# Define the commitlint stage
- stage: commitlint
# Define the `lint` stage (runs `yamllint` and `commitlint`)
- stage: lint
language: node_js
node_js: lts/*
before_install: skip
script:
# Install and run `yamllint`
- pip install --user yamllint
# yamllint disable-line rule:line-length
- yamllint -s . .yamllint pillar.example test/salt/pillar/install_binary.sls test/salt/pillar/dev_server.sls test/salt/pillar/prod_server.sls
# Install and run `commitlint`
- npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D
- commitlint-travis
# Define the release stage that runs semantic-release
# Define the release stage that runs `semantic-release`
- stage: release
language: node_js
node_js: lts/*
Expand Down
16 changes: 16 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# Extend the `default` configuration provided by `yamllint`
extends: default

# Files to ignore completely
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
ignore: |
node_modules/
rules:
line-length:
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
max: 88
3 changes: 2 additions & 1 deletion kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ platforms:
platform: rhel
run_command: /sbin/init
provision_command:
- curl -L https://bootstrap.saltstack.com | sh -s -- -X # install latest stable Salt
# install latest stable Salt
- curl -L https://bootstrap.saltstack.com | sh -s -- -X

## SALT `develop`
- name: debian-9-develop-py3
Expand Down
9 changes: 4 additions & 5 deletions pillar.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
# vim: ft=sls syntax=yaml softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent

# vim: ft=yaml
---
vault:
version: 1.1.0
platform: linux_amd64
dev_mode: False
verify_download: True
dev_mode: false
verify_download: true
config:
storage:
consul:
Expand Down Expand Up @@ -51,4 +51,3 @@ vault:
oEIgXTMyCILo34Fa/C6VCm2WBgz9zZO8/rHIiQm1J5zqz0DrDwKBUM9C
=LYpS
-----END PGP PUBLIC KEY BLOCK-----
3 changes: 3 additions & 0 deletions test/integration/dev_server/inspec.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: dev_server
title: vault formula
maintainer: SaltStack Formulas
Expand Down
3 changes: 3 additions & 0 deletions test/integration/install_binary/inspec.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: install_binary
title: vault formula
maintainer: SaltStack Formulas
Expand Down
3 changes: 3 additions & 0 deletions test/integration/prod_server/inspec.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: prod_server
title: vault formula
maintainer: SaltStack Formulas
Expand Down
5 changes: 4 additions & 1 deletion test/salt/pillar/dev_server.sls
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
vault:
dev_mode: True
dev_mode: true
9 changes: 7 additions & 2 deletions test/salt/pillar/install_binary.sls
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
vault:
# version: 1.0.3 # test upgrades by doing a double-converge, changing the version pillar between each one
# test upgrades by doing a double-converge, changing the version pillar
# between each one
# version: 1.0.3
version: 1.1.0
verify_download: False
verify_download: false
5 changes: 4 additions & 1 deletion test/salt/pillar/prod_server.sls
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
vault:
config:
storage:
file:
path: /var/lib/vault/data
tls_disable: 1
self_signed_cert:
enabled: True
enabled: true
hostname: localhost
password: localhost
country: GB
Expand Down
10 changes: 5 additions & 5 deletions vault/defaults.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
# vim: ft=sls syntax=yaml softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent

# vim: ft=yaml
---
vault:
version: 1.1.0
platform: linux_amd64
gpg_pkg: gnupg2
setcap_pkg: libcap
dev_mode: False
verify_download: True
dev_mode: false
verify_download: true
self_signed_cert:
enabled: False
enabled: false
config:
listener:
tcp:
Expand Down
4 changes: 2 additions & 2 deletions vault/initfamilymap.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=sls syntax=yaml softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent

# vim: ft=yaml
---
systemd:
service:
path: /etc/systemd/system/vault.service
Expand Down
4 changes: 2 additions & 2 deletions vault/osfamilymap.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=sls syntax=yaml softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent

# vim: ft=yaml
---
Debian:
setcap_pkg: libcap2-bin

Expand Down

0 comments on commit c6a7788

Please sign in to comment.