|
| 1 | +stages: |
| 2 | + - test |
| 3 | + - commitlint |
| 4 | + - name: release |
| 5 | + if: branch = master AND type != pull_request |
| 6 | + |
1 | 7 | sudo: required
|
2 | 8 | cache: bundler
|
3 | 9 | language: ruby
|
4 | 10 |
|
5 | 11 | services:
|
6 | 12 | - docker
|
7 | 13 |
|
8 |
| -before_install: |
9 |
| - - bundle install |
10 |
| - |
| 14 | +# Make sure the instances listed below match up with |
| 15 | +# the `platforms` defined in `kitchen.yml` |
11 | 16 | env:
|
12 | 17 | matrix:
|
13 |
| - - INSTANCE: bind-debian-8 |
14 |
| - - INSTANCE: bind-debian-9 |
15 |
| - - INSTANCE: bind-ubuntu-1604 |
16 |
| - - INSTANCE: bind-ubuntu-1804 |
17 |
| - - INSTANCE: bind-fedora-27 |
18 |
| - - INSTANCE: bind-centos-7 |
| 18 | + - INSTANCE: default-debian-9-2019-2-py3 |
| 19 | + - INSTANCE: default-ubuntu-1804-2019-2-py3 |
| 20 | + - INSTANCE: default-centos-7-2019-2-py3 |
| 21 | + - INSTANCE: default-fedora-29-2019-2-py3 |
| 22 | + - INSTANCE: default-opensuse-leap-15-2019-2-py3 |
| 23 | + - INSTANCE: default-debian-9-2018-3-py2 |
| 24 | + - INSTANCE: default-ubuntu-1604-2018-3-py2 |
| 25 | + - INSTANCE: default-centos-7-2018-3-py2 |
| 26 | + - INSTANCE: default-fedora-29-2018-3-py2 |
| 27 | + # TODO: Use this when fixed instead of `opensuse-leap-42` |
| 28 | + # Ref: https://github.com/netmanagers/salt-image-builder/issues/2 |
| 29 | + # - INSTANCE: default-opensuse-leap-15-2018-3-py2 |
| 30 | + - INSTANCE: default-opensuse-leap-42-2018-3-py2 |
| 31 | + - INSTANCE: default-debian-8-2017-7-py2 |
| 32 | + - INSTANCE: default-ubuntu-1604-2017-7-py2 |
| 33 | + # TODO: Enable after improving the formula to work with other than `systemd` |
| 34 | + - INSTANCE: default-centos-6-2017-7-py2 |
| 35 | + - INSTANCE: default-fedora-28-2017-7-py2 |
| 36 | + - INSTANCE: default-opensuse-leap-42-2017-7-py2 |
19 | 37 |
|
20 | 38 | script:
|
21 | 39 | - bundle exec kitchen verify ${INSTANCE}
|
22 | 40 |
|
| 41 | +jobs: |
| 42 | + include: |
| 43 | + # Define the commitlint stage |
| 44 | + - stage: commitlint |
| 45 | + language: node_js |
| 46 | + node_js: lts/* |
| 47 | + before_install: skip |
| 48 | + script: |
| 49 | + - npm install @commitlint/config-conventional -D |
| 50 | + - npm install @commitlint/travis-cli -D |
| 51 | + - commitlint-travis |
| 52 | + # Define the release stage that runs semantic-release |
| 53 | + - stage: release |
| 54 | + language: node_js |
| 55 | + node_js: lts/* |
| 56 | + before_install: skip |
| 57 | + script: |
| 58 | + # Update `AUTHORS.md` |
| 59 | + - export MAINTAINER_TOKEN=${GH_TOKEN} |
| 60 | + - go get github.com/myii/maintainer |
| 61 | + - maintainer contributor |
| 62 | + |
| 63 | + # Install all dependencies required for `semantic-release` |
| 64 | + - npm install @semantic-release/changelog@3 -D |
| 65 | + - npm install @semantic-release/exec@3 -D |
| 66 | + - npm install @semantic-release/git@7 -D |
| 67 | + deploy: |
| 68 | + provider: script |
| 69 | + skip_cleanup: true |
| 70 | + script: |
| 71 | + # Run `semantic-release` |
| 72 | + - npx semantic-release@15 |
0 commit comments