|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# vim: ft=yaml |
| 3 | +--- |
| 4 | +stages: |
| 5 | + - test |
| 6 | + - lint |
| 7 | + - name: release |
| 8 | + if: branch = master AND type != pull_request |
| 9 | + |
| 10 | +sudo: required |
| 11 | +cache: bundler |
| 12 | +language: ruby |
| 13 | +dist: xenial |
| 14 | + |
| 15 | +services: |
| 16 | + - docker |
| 17 | + |
| 18 | +# Make sure the instances listed below match up with |
| 19 | +# the `platforms` defined in `kitchen.yml` |
| 20 | +env: |
| 21 | + matrix: |
| 22 | + - INSTANCE: default-debian-10-develop-py3 |
| 23 | + # - INSTANCE: default-ubuntu-1804-develop-py3 |
| 24 | + # - INSTANCE: default-centos-7-develop-py3 |
| 25 | + # - INSTANCE: default-fedora-30-develop-py3 |
| 26 | + # - INSTANCE: default-opensuse-leap-15-develop-py3 |
| 27 | + # - INSTANCE: default-amazonlinux-2-develop-py2 |
| 28 | + # - INSTANCE: default-debian-9-2019-2-py3 |
| 29 | + - INSTANCE: default-ubuntu-1804-2019-2-py3 |
| 30 | + # - INSTANCE: default-centos-7-2019-2-py3 |
| 31 | + # - INSTANCE: default-fedora-30-2019-2-py3 |
| 32 | + # - INSTANCE: default-opensuse-leap-15-2019-2-py3 |
| 33 | + - INSTANCE: default-amazonlinux-2-2019-2-py2 |
| 34 | + # - INSTANCE: default-debian-9-2018-3-py2 |
| 35 | + # - INSTANCE: default-ubuntu-1604-2018-3-py2 |
| 36 | + # - INSTANCE: default-centos-7-2018-3-py2 |
| 37 | + - INSTANCE: default-fedora-29-2018-3-py2 |
| 38 | + - INSTANCE: default-opensuse-leap-15-2018-3-py2 |
| 39 | + # - INSTANCE: default-amazonlinux-2-2018-3-py2 |
| 40 | + # - INSTANCE: default-debian-8-2017-7-py2 |
| 41 | + # - INSTANCE: default-ubuntu-1604-2017-7-py2 |
| 42 | + - INSTANCE: default-centos-6-2017-7-py2 |
| 43 | + # - INSTANCE: default-fedora-29-2017-7-py2 |
| 44 | + # - INSTANCE: default-opensuse-leap-15-2017-7-py2 |
| 45 | + # - INSTANCE: default-amazonlinux-2-2017-7-py2 |
| 46 | + |
| 47 | +script: |
| 48 | + - bin/kitchen verify ${INSTANCE} |
| 49 | + |
| 50 | +jobs: |
| 51 | + include: |
| 52 | + # Define the `lint` stage (runs `yamllint` and `commitlint`) |
| 53 | + - stage: lint |
| 54 | + language: node_js |
| 55 | + node_js: lts/* |
| 56 | + before_install: skip |
| 57 | + script: |
| 58 | + # Install and run `yamllint` |
| 59 | + - pip install --user yamllint |
| 60 | + # yamllint disable-line rule:line-length |
| 61 | + - yamllint -s . .yamllint pillar.example test/salt/pillar/vsftpd.sls |
| 62 | + # Install and run `commitlint` |
| 63 | + - npm install @commitlint/config-conventional -D |
| 64 | + - npm install @commitlint/travis-cli -D |
| 65 | + - commitlint-travis |
| 66 | + # Define the release stage that runs `semantic-release` |
| 67 | + - stage: release |
| 68 | + language: node_js |
| 69 | + node_js: lts/* |
| 70 | + before_install: skip |
| 71 | + script: |
| 72 | + # Update `AUTHORS.md` |
| 73 | + - export MAINTAINER_TOKEN=${GH_TOKEN} |
| 74 | + - go get github.com/myii/maintainer |
| 75 | + - maintainer contributor |
| 76 | + |
| 77 | + # Install all dependencies required for `semantic-release` |
| 78 | + - npm install @semantic-release/changelog@3 -D |
| 79 | + - npm install @semantic-release/exec@3 -D |
| 80 | + - npm install @semantic-release/git@7 -D |
| 81 | + deploy: |
| 82 | + provider: script |
| 83 | + skip_cleanup: true |
| 84 | + script: |
| 85 | + # Run `semantic-release` |
| 86 | + - npx semantic-release@15 |
0 commit comments