|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
-
-
- ---
-
-
-
- .node_anchors:
-
- only_branch_master_parent_repo: &only_branch_master_parent_repo
- - 'master@saltstack-formulas/openssh-formula'
-
- stage_lint: &stage_lint 'lint'
- stage_release: &stage_release 'release'
- stage_test: &stage_test 'test'
-
- image_commitlint: &image_commitlint 'myii/ssf-commitlint:11'
- image_dindruby: &image_dindruby 'myii/ssf-dind-ruby:2.7.1-r3'
- image_precommit: &image_precommit
- name: 'myii/ssf-pre-commit:2.9.2'
- entrypoint: ['/bin/bash', '-c']
- image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest'
- image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14'
-
- services_docker_dind: &services_docker_dind
- - 'docker:dind'
-
-
-
- variables_bundler: &variables_bundler
- BUNDLE_CACHE_PATH: '${CI_PROJECT_DIR}/.cache/bundler'
- BUNDLE_WITHOUT: 'production'
-
- cache_bundler: &cache_bundler
- key: '${CI_JOB_STAGE}'
- paths:
- - '${BUNDLE_CACHE_PATH}'
-
-
-
-
- stages:
- - *stage_lint
- - *stage_test
- - *stage_release
- variables:
- DOCKER_DRIVER: 'overlay2'
-
-
-
-
- commitlint:
- stage: *stage_lint
- image: *image_commitlint
- script:
-
- - 'git remote add upstream
- https://gitlab.com/saltstack-formulas/openssh-formula.git'
- - 'git fetch --all'
-
- - 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"'
- - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
-
-
- - |
- if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \
- && [ "${CI_COMMIT_BRANCH}" != "master" ]; then
- git commit --amend -m \
- 'chore: reword coqbot merge commit message for commitlint'
- export COMMITLINT_TO=HEAD
- fi
- # Run `commitlint`
- - 'commitlint --from "${COMMITLINT_FROM}"
- --to "${COMMITLINT_TO}"
- --verbose'
-
- pre-commit:
- stage: *stage_lint
- image: *image_precommit
-
- variables:
- PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit'
- cache:
- key: '${CI_JOB_NAME}'
- paths:
- - '${PRE_COMMIT_HOME}'
- script:
- - 'pre-commit run --all-files --color always --verbose'
-
-
-
-
-
-
-
- rubocop:
- allow_failure: true
- stage: *stage_lint
- image: *image_rubocop
- script:
- - 'rubocop -d -P -S --enable-pending-cops'
-
-
-
-
- .test_instance: &test_instance
- stage: *stage_test
- image: *image_dindruby
- services: *services_docker_dind
- variables: *variables_bundler
- cache: *cache_bundler
- before_script:
-
- - 'bundle config set path "${BUNDLE_CACHE_PATH}"'
- - 'bundle config set without "${BUNDLE_WITHOUT}"'
- - 'bundle install'
- script:
-
- - 'bin/kitchen verify "${DOCKER_ENV_CI_JOB_NAME}"'
-
-
-
-
- .test_instance_failure_permitted:
- <<: *test_instance
- allow_failure: true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- default-debian-11-master-py3: {extends: '.test_instance'}
- default-debian-10-master-py3: {extends: '.test_instance'}
- default-debian-9-master-py3: {extends: '.test_instance'}
- default-ubuntu-2004-master-py3: {extends: '.test_instance'}
- default-ubuntu-1804-master-py3: {extends: '.test_instance'}
- default-centos-stream8-master-py3: {extends: '.test_instance_failure_permitted'}
- default-centos-7-master-py3: {extends: '.test_instance'}
- default-fedora-34-master-py3: {extends: '.test_instance'}
- default-opensuse-leap-153-master-py3: {extends: '.test_instance'}
- default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance_failure_permitted'}
- default-amazonlinux-2-master-py3: {extends: '.test_instance'}
- default-oraclelinux-8-master-py3: {extends: '.test_instance'}
- default-oraclelinux-7-master-py3: {extends: '.test_instance'}
- default-arch-base-latest-master-py3: {extends: '.test_instance'}
- default-gentoo-stage3-latest-master-py3: {extends: '.test_instance'}
- default-gentoo-stage3-systemd-master-py3: {extends: '.test_instance'}
- default-almalinux-8-master-py3: {extends: '.test_instance'}
- default-rockylinux-8-master-py3: {extends: '.test_instance'}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- semantic-release:
- only: *only_branch_master_parent_repo
- stage: *stage_release
- image: *image_semanticrelease
- variables:
- MAINTAINER_TOKEN: '${GH_TOKEN}'
- script:
-
- - '${HOME}/go/bin/maintainer contributor'
-
- - 'semantic-release'
|