Saltstack Official Salt Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

102 lines
3.6KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. ## Machine config
  5. dist: bionic
  6. version: '~> 1.0'
  7. sudo: required
  8. services:
  9. - docker
  10. ## Language and cache config
  11. language: ruby
  12. cache: bundler
  13. ## Script to run for the test stage
  14. script:
  15. - bin/kitchen verify "${INSTANCE}"
  16. ## Stages and jobs matrix
  17. stages:
  18. - test
  19. - name: release
  20. if: branch = master AND type != pull_request
  21. jobs:
  22. include:
  23. ## Define the test stage that runs the linters (and testing matrix, if applicable)
  24. # Run all of the linters in a single job
  25. - language: node_js
  26. node_js: lts/*
  27. env: Lint
  28. name: 'Lint: salt-lint, yamllint, rubocop & commitlint'
  29. before_install: skip
  30. script:
  31. # Install and run `salt-lint`
  32. - pip install --user salt-lint
  33. - git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$\|\.tst$'
  34. | xargs salt-lint
  35. # Install and run `yamllint`
  36. # Need at least `v1.17.0` for the `yaml-files` setting
  37. - pip install --user yamllint>=1.17.0
  38. - yamllint -s .
  39. # Install and run `rubocop`
  40. - gem install rubocop
  41. - rubocop -d
  42. # Install and run `commitlint`
  43. - npm i -D @commitlint/config-conventional
  44. @commitlint/travis-cli
  45. - commitlint-travis
  46. ## Define the rest of the matrix based on Kitchen testing
  47. # Make sure the instances listed below match up with
  48. # the `platforms` defined in `kitchen.yml`
  49. # The ordering used below has been selected based on the time required in Travis
  50. # The slower ones are kept as high up as possible, to run concurrently rather than
  51. # slow down the entire run at the end (i.e. `centos-6` and `opensuse`)
  52. # However, the groupings needed to be maintained in some semblance of order
  53. # so this is a best-effort matrix, in the circumstances
  54. # - env: INSTANCE=v201707-py2-debian-8-2017-7-py2
  55. - env: INSTANCE=v201707-py2-ubuntu-1604-2017-7-py2
  56. - env: INSTANCE=v201707-py2-centos-6-2017-7-py2
  57. # - env: INSTANCE=v201707-py2-amazonlinux-2-2017-7-py2
  58. # - env: INSTANCE=v201707-py2-arch-base-latest-2017-7-py2
  59. - env: INSTANCE=v201803-py2-debian-9-2018-3-py2
  60. # - env: INSTANCE=v201803-py2-ubuntu-1604-2018-3-py2
  61. - env: INSTANCE=v201803-py2-centos-7-2018-3-py2
  62. # - env: INSTANCE=v201803-py2-amazonlinux-2-2018-3-py2
  63. # - env: INSTANCE=v201803-py2-arch-base-latest-2018-3-py2
  64. - env: INSTANCE=v201902-py2-ubuntu-1804-2019-2-py2
  65. # - env: INSTANCE=v201902-py2-centos-7-2019-2-py2
  66. - env: INSTANCE=v201902-py2-amazonlinux-2-2019-2-py2
  67. # - env: INSTANCE=v201902-py2-arch-base-latest-2019-2-py2
  68. - env: INSTANCE=v201902-py3-debian-10-2019-2-py3
  69. # - env: INSTANCE=v201902-py3-debian-9-2019-2-py3
  70. # - env: INSTANCE=v201902-py3-ubuntu-1804-2019-2-py3
  71. # - env: INSTANCE=v201902-py3-centos-8-2019-2-py3
  72. - env: INSTANCE=v201902-py3-opensuse-leap-151-2019-2-py3
  73. ## Define the release stage that runs `semantic-release`
  74. - stage: release
  75. language: node_js
  76. node_js: lts/*
  77. env: Release
  78. name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
  79. before_install: skip
  80. script:
  81. # Update `AUTHORS.md`
  82. - export MAINTAINER_TOKEN=${GH_TOKEN}
  83. - go get github.com/myii/maintainer
  84. - maintainer contributor
  85. # Install all dependencies required for `semantic-release`
  86. - npm i -D @semantic-release/changelog@3
  87. @semantic-release/exec@3
  88. @semantic-release/git@7
  89. deploy:
  90. provider: script
  91. skip_cleanup: true
  92. script:
  93. # Run `semantic-release`
  94. - npx semantic-release@15