Saltstack Official Syslog-NG Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

112 lines
3.7KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. ## Machine config
  5. os: 'linux'
  6. arch: 'amd64'
  7. dist: 'bionic'
  8. version: '~> 1.0'
  9. ## Language and cache config
  10. language: 'ruby'
  11. cache: 'bundler'
  12. ## Stages and jobs matrix
  13. stages:
  14. - test
  15. - name: 'release'
  16. if: 'branch = master AND type != pull_request'
  17. jobs:
  18. allow_failures:
  19. - env: Lint_rubocop
  20. fast_finish: true
  21. include:
  22. ## Define the test stage that runs the linters (and testing matrix, if applicable)
  23. # Run all of the linters in a single job (except `rubocop`)
  24. - language: 'node_js'
  25. node_js: 'lts/*'
  26. env: 'Lint'
  27. name: 'Lint: salt-lint, yamllint, shellcheck & commitlint'
  28. before_install: 'skip'
  29. script:
  30. # Install and run `salt-lint`
  31. - pip install --user salt-lint
  32. - git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst'
  33. | xargs salt-lint
  34. # Install and run `yamllint`
  35. # Need at least `v1.17.0` for the `yaml-files` setting
  36. - pip install --user yamllint>=1.17.0
  37. - yamllint -s .
  38. # Run `shellcheck` (already pre-installed in Travis)
  39. - shellcheck --version
  40. - git ls-files -- '*.sh' '*.bash' '*.ksh'
  41. | xargs shellcheck
  42. # Install and run `commitlint`
  43. - npm i -D @commitlint/config-conventional
  44. @commitlint/travis-cli
  45. - commitlint-travis
  46. # Run the `rubocop` linter in a separate job that is allowed to fail
  47. # Once these lint errors are fixed, this can be merged into a single job
  48. - language: node_js
  49. node_js: lts/*
  50. env: Lint_rubocop
  51. name: 'Lint: rubocop'
  52. before_install: skip
  53. script:
  54. # Install and run `rubocop`
  55. - gem install rubocop
  56. - rubocop -d
  57. # Run `pre-commit` linters in a single job
  58. - language: 'python'
  59. env: 'Lint_pre-commit'
  60. name: 'Lint: pre-commit'
  61. before_install: 'skip'
  62. cache:
  63. directories:
  64. - $HOME/.cache/pre-commit
  65. script:
  66. # Install and run `pre-commit`
  67. - pip install pre-commit==2.7.1
  68. - pre-commit run --all-files --color always --verbose
  69. - pre-commit run --color always --hook-stage manual --verbose commitlint-travis
  70. ## Define the release stage that runs `semantic-release`
  71. - stage: 'release'
  72. language: 'node_js'
  73. node_js: 'lts/*'
  74. env: 'Release'
  75. name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
  76. before_install: 'skip'
  77. script:
  78. # Update `AUTHORS.md`
  79. - export MAINTAINER_TOKEN=${GH_TOKEN}
  80. - go get github.com/myii/maintainer
  81. - maintainer contributor
  82. # Install all dependencies required for `semantic-release`
  83. - npm i -D @semantic-release/changelog@3
  84. @semantic-release/exec@3
  85. @semantic-release/git@7
  86. deploy:
  87. provider: 'script'
  88. # Opt-in to `dpl v2` to complete the Travis build config validation (beta)
  89. # * https://docs.travis-ci.com/user/build-config-validation
  90. # Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default
  91. edge: true
  92. # Run `semantic-release`
  93. script: 'npx semantic-release@15.14'
  94. # Notification options: `always`, `never` or `change`
  95. notifications:
  96. webhooks:
  97. if: 'repo = saltstack-formulas/syslog-ng-formula'
  98. urls:
  99. - https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Fsyslog-ng-formula&ignore_pull_requests=true
  100. on_success: always # default: always
  101. on_failure: always # default: always
  102. on_start: always # default: never
  103. on_cancel: always # default: always
  104. on_error: always # default: always