11# -*- coding: utf-8 -*-
22# vim: ft=yaml
33---
4+ # # Machine config
45dist : bionic
5- stages :
6- - test
7- - lint
8- - name : release
9- if : branch = master AND type != pull_request
10-
116sudo : required
12- cache : bundler
13- language : ruby
14-
157services :
168 - docker
179
18- # Make sure the instances listed below match up with
19- # the `platforms` defined in `kitchen.yml`
20- env :
21- matrix :
22- - INSTANCE : debian-debian-10-develop-py3
23- # - INSTANCE: ubuntu-ubuntu-1804-develop-py3
24- # - INSTANCE: redhat-centos-7-develop-py3
25- # - INSTANCE: redhat-fedora-30-develop-py3
26- # - INSTANCE: suse-opensuse-leap-15-develop-py3
27- # - INSTANCE: redhat-amazonlinux-2-develop-py2
28- # - INSTANCE: debian-debian-9-2019-2-py3
29- - INSTANCE : ubuntu-ubuntu-1804-2019-2-py3
30- # - INSTANCE: redhat-centos-7-2019-2-py3
31- # - INSTANCE: redhat-fedora-30-2019-2-py3
32- # - INSTANCE: suse-opensuse-leap-15-2019-2-py3
33- - INSTANCE : redhat-amazonlinux-2-2019-2-py2
34- # - INSTANCE: debian-debian-9-2018-3-py2
35- # - INSTANCE: ubuntu-ubuntu-1604-2018-3-py2
36- # - INSTANCE: redhat-centos-7-2018-3-py2
37- - INSTANCE : redhat-fedora-29-2018-3-py2
38- - INSTANCE : suse-opensuse-leap-15-2018-3-py2
39- # - INSTANCE: redhat-amazonlinux-2-2018-3-py2
40- # - INSTANCE: debian-debian-8-2017-7-py2
41- # - INSTANCE: ubuntu-ubuntu-1604-2017-7-py2
42- - INSTANCE : redhat-centos-6-2017-7-py2
43- # - INSTANCE: redhat-fedora-29-2017-7-py2
44- # - INSTANCE: suse-opensuse-leap-15-2017-7-py2
45- # - INSTANCE: redhat-amazonlinux-2-2017-7-py2
10+ # # Language and cache config
11+ language : ruby
12+ cache : bundler
4613
14+ # # Script to run for the test stage
4715script :
48- - bin/kitchen verify ${INSTANCE}
16+ - bin/kitchen verify " ${INSTANCE}"
4917
18+ # # Stages and jobs matrix
19+ stages :
20+ - test
21+ - name : release
22+ if : branch = master AND type != pull_request
5023jobs :
24+ allow_failures :
25+ - env : Lint_rubocop
26+ fast_finish : true
5127 include :
52- # Define the `lint` stage (runs `yamllint` and `commitlint`)
53- - stage : lint
54- language : node_js
28+ # # Define the test stage that runs the linters (and testing matrix, if applicable)
29+
30+ # Run all of the linters in a single job (except `rubocop`)
31+ - language : node_js
5532 node_js : lts/*
33+ env : Lint
34+ name : ' Lint: salt-lint, yamllint & commitlint'
5635 before_install : skip
5736 script :
37+ # Install and run `salt-lint`
38+ - pip install --user salt-lint
39+ - git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$'
40+ | xargs -I {} salt-lint {}
5841 # Install and run `yamllint`
5942 # Need at least `v1.17.0` for the `yaml-files` setting
6043 - pip install --user yamllint>=1.17.0
@@ -63,10 +46,52 @@ jobs:
6346 - npm install @commitlint/config-conventional -D
6447 - npm install @commitlint/travis-cli -D
6548 - commitlint-travis
66- # Define the release stage that runs `semantic-release`
49+ # Run the `rubocop` linter in a separate job that is allowed to fail
50+ # Once these lint errors are fixed, this can be merged into a single job
51+ - language : node_js
52+ node_js : lts/*
53+ env : Lint_rubocop
54+ name : ' Lint: rubocop'
55+ before_install : skip
56+ script :
57+ # Install and run `rubocop`
58+ - gem install rubocop
59+ - rubocop -d
60+
61+ # # Define the rest of the matrix based on Kitchen testing
62+ # Make sure the instances listed below match up with
63+ # the `platforms` defined in `kitchen.yml`
64+ - env : INSTANCE=debian-debian-10-develop-py3
65+ # - env: INSTANCE=ubuntu-ubuntu-1804-develop-py3
66+ # - env: INSTANCE=redhat-centos-7-develop-py3
67+ # - env: INSTANCE=redhat-fedora-30-develop-py3
68+ # - env: INSTANCE=suse-opensuse-leap-15-develop-py3
69+ # - env: INSTANCE=redhat-amazonlinux-2-develop-py2
70+ # - env: INSTANCE=debian-debian-9-2019-2-py3
71+ - env : INSTANCE=ubuntu-ubuntu-1804-2019-2-py3
72+ # - env: INSTANCE=redhat-centos-7-2019-2-py3
73+ # - env: INSTANCE=redhat-fedora-30-2019-2-py3
74+ # - env: INSTANCE=suse-opensuse-leap-15-2019-2-py3
75+ - env : INSTANCE=redhat-amazonlinux-2-2019-2-py2
76+ # - env: INSTANCE=debian-debian-9-2018-3-py2
77+ # - env: INSTANCE=ubuntu-ubuntu-1604-2018-3-py2
78+ # - env: INSTANCE=redhat-centos-7-2018-3-py2
79+ - env : INSTANCE=redhat-fedora-29-2018-3-py2
80+ - env : INSTANCE=suse-opensuse-leap-15-2018-3-py2
81+ # - env: INSTANCE=redhat-amazonlinux-2-2018-3-py2
82+ # - env: INSTANCE=debian-debian-8-2017-7-py2
83+ # - env: INSTANCE=ubuntu-ubuntu-1604-2017-7-py2
84+ - env : INSTANCE=redhat-centos-6-2017-7-py2
85+ # - env: INSTANCE=redhat-fedora-29-2017-7-py2
86+ # - env: INSTANCE=suse-opensuse-leap-15-2017-7-py2
87+ # - env: INSTANCE=redhat-amazonlinux-2-2017-7-py2
88+
89+ # # Define the release stage that runs `semantic-release`
6790 - stage : release
6891 language : node_js
6992 node_js : lts/*
93+ env : Release
94+ name : ' Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
7095 before_install : skip
7196 script :
7297 # Update `AUTHORS.md`
0 commit comments