ci: test for upstream Salt regressions in master
instances (2021-W37a)
* Automated using https://github.com/myii/ssf-formula/pull/999
This commit is contained in:
parent
aff6dd2875
commit
69dcfd9c3b
103
.gitlab-ci.yml
103
.gitlab-ci.yml
@ -49,56 +49,58 @@ variables:
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# `lint` stage: `commitlint`, `pre-commit` & `rubocop` (latest, failure allowed)
|
# `lint` stage: `commitlint`, `pre-commit` & `rubocop` (latest, failure allowed)
|
||||||
###############################################################################
|
###############################################################################
|
||||||
commitlint:
|
# commitlint:
|
||||||
stage: *stage_lint
|
# allow_failure: true
|
||||||
image: *image_commitlint
|
# stage: *stage_lint
|
||||||
script:
|
# image: *image_commitlint
|
||||||
# Add `upstream` remote to get access to `upstream/master`
|
# script:
|
||||||
- 'git remote add upstream
|
# # Add `upstream` remote to get access to `upstream/master`
|
||||||
https://gitlab.com/saltstack-formulas/apache-formula.git'
|
# - 'git remote add upstream
|
||||||
- 'git fetch --all'
|
# https://gitlab.com/saltstack-formulas/apache-formula.git'
|
||||||
# Set default commit hashes for `--from` and `--to`
|
# - 'git fetch --all'
|
||||||
- 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"'
|
# # Set default commit hashes for `--from` and `--to`
|
||||||
- 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
|
# - 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"'
|
||||||
# `coqbot` adds a merge commit to test PRs on top of the latest commit in
|
# - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
|
||||||
# the repo; amend this merge commit message to avoid failure
|
# # `coqbot` adds a merge commit to test PRs on top of the latest commit in
|
||||||
- |
|
# # the repo; amend this merge commit message to avoid failure
|
||||||
if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \
|
# - |
|
||||||
&& [ "${CI_COMMIT_BRANCH}" != "master" ]; then
|
# if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \
|
||||||
git commit --amend -m \
|
# && [ "${CI_COMMIT_BRANCH}" != "master" ]; then
|
||||||
'chore: reword coqbot merge commit message for commitlint'
|
# git commit --amend -m \
|
||||||
export COMMITLINT_TO=HEAD
|
# 'chore: reword coqbot merge commit message for commitlint'
|
||||||
fi
|
# export COMMITLINT_TO=HEAD
|
||||||
# Run `commitlint`
|
# fi
|
||||||
- 'commitlint --from "${COMMITLINT_FROM}"
|
# # Run `commitlint`
|
||||||
--to "${COMMITLINT_TO}"
|
# - 'commitlint --from "${COMMITLINT_FROM}"
|
||||||
--verbose'
|
# --to "${COMMITLINT_TO}"
|
||||||
|
# --verbose'
|
||||||
pre-commit:
|
#
|
||||||
stage: *stage_lint
|
# pre-commit:
|
||||||
image: *image_precommit
|
# allow_failure: true
|
||||||
# https://pre-commit.com/#gitlab-ci-example
|
# stage: *stage_lint
|
||||||
variables:
|
# image: *image_precommit
|
||||||
PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit'
|
# # https://pre-commit.com/#gitlab-ci-example
|
||||||
cache:
|
# variables:
|
||||||
key: '${CI_JOB_NAME}'
|
# PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit'
|
||||||
paths:
|
# cache:
|
||||||
- '${PRE_COMMIT_HOME}'
|
# key: '${CI_JOB_NAME}'
|
||||||
script:
|
# paths:
|
||||||
- 'pre-commit run --all-files --color always --verbose'
|
# - '${PRE_COMMIT_HOME}'
|
||||||
|
# script:
|
||||||
# Use a separate job for `rubocop` other than the one potentially run by `pre-commit`
|
# - 'pre-commit run --all-files --color always --verbose'
|
||||||
# - The `pre-commit` check will only be available for formulas that pass the default
|
#
|
||||||
# `rubocop` check -- and must continue to do so
|
# # Use a separate job for `rubocop` other than the one potentially run by `pre-commit`
|
||||||
# - This job is allowed to fail, so can be used for all formulas
|
# # - The `pre-commit` check will only be available for formulas that pass the default
|
||||||
# - Furthermore, this job uses all of the latest `rubocop` features & cops,
|
# # `rubocop` check -- and must continue to do so
|
||||||
# which will help when upgrading the `rubocop` linter used in `pre-commit`
|
# # - This job is allowed to fail, so can be used for all formulas
|
||||||
rubocop:
|
# # - Furthermore, this job uses all of the latest `rubocop` features & cops,
|
||||||
allow_failure: true
|
# # which will help when upgrading the `rubocop` linter used in `pre-commit`
|
||||||
stage: *stage_lint
|
# rubocop:
|
||||||
image: *image_rubocop
|
# allow_failure: true
|
||||||
script:
|
# stage: *stage_lint
|
||||||
- 'rubocop -d -P -S --enable-pending-cops'
|
# image: *image_rubocop
|
||||||
|
# script:
|
||||||
|
# - 'rubocop -d -P -S --enable-pending-cops'
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Define `test` template
|
# Define `test` template
|
||||||
@ -114,6 +116,7 @@ rubocop:
|
|||||||
- 'bundle config set path "${BUNDLE_CACHE_PATH}"'
|
- 'bundle config set path "${BUNDLE_CACHE_PATH}"'
|
||||||
- 'bundle config set without "${BUNDLE_WITHOUT}"'
|
- 'bundle config set without "${BUNDLE_WITHOUT}"'
|
||||||
- 'bundle install'
|
- 'bundle install'
|
||||||
|
# - 'bundle update --all'
|
||||||
script:
|
script:
|
||||||
# Alternative value to consider: `${CI_JOB_NAME}`
|
# Alternative value to consider: `${CI_JOB_NAME}`
|
||||||
- 'bin/kitchen verify "${DOCKER_ENV_CI_JOB_NAME}"'
|
- 'bin/kitchen verify "${DOCKER_ENV_CI_JOB_NAME}"'
|
||||||
|
54
.travis.yml
54
.travis.yml
@ -24,6 +24,10 @@ cache: 'bundler'
|
|||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
## Use the latest gems for this `master` run
|
||||||
|
## https://docs.travis-ci.com/user/job-lifecycle/
|
||||||
|
before_install: bundle update
|
||||||
|
|
||||||
## Script to run for the test stage
|
## Script to run for the test stage
|
||||||
script:
|
script:
|
||||||
- bin/kitchen verify "${INSTANCE}"
|
- bin/kitchen verify "${INSTANCE}"
|
||||||
@ -37,48 +41,6 @@ stages:
|
|||||||
# if: 'branch = master AND type != pull_request'
|
# if: 'branch = master AND type != pull_request'
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
## Define the test stage that runs the linters (and testing matrix, if applicable)
|
|
||||||
|
|
||||||
# Run all of the linters in a single job
|
|
||||||
- language: 'node_js'
|
|
||||||
node_js: 'lts/*'
|
|
||||||
env: 'Lint'
|
|
||||||
name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint'
|
|
||||||
before_install: 'skip'
|
|
||||||
script:
|
|
||||||
# Install and run `salt-lint`
|
|
||||||
- pip install --user salt-lint
|
|
||||||
- git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst'
|
|
||||||
| xargs salt-lint
|
|
||||||
# Install and run `yamllint`
|
|
||||||
# Need at least `v1.17.0` for the `yaml-files` setting
|
|
||||||
- pip install --user yamllint>=1.17.0
|
|
||||||
- yamllint -s .
|
|
||||||
# Install and run `rubocop`
|
|
||||||
- gem install rubocop
|
|
||||||
- rubocop -d
|
|
||||||
# Run `shellcheck` (already pre-installed in Travis)
|
|
||||||
- shellcheck --version
|
|
||||||
- git ls-files -- '*.sh' '*.bash' '*.ksh'
|
|
||||||
| xargs shellcheck
|
|
||||||
# Install and run `commitlint`
|
|
||||||
- npm i -D @commitlint/config-conventional
|
|
||||||
@commitlint/travis-cli
|
|
||||||
- commitlint-travis
|
|
||||||
|
|
||||||
# Run `pre-commit` linters in a single job
|
|
||||||
- language: 'python'
|
|
||||||
env: 'Lint_pre-commit'
|
|
||||||
name: 'Lint: pre-commit'
|
|
||||||
before_install: 'skip'
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.cache/pre-commit
|
|
||||||
script:
|
|
||||||
# Install and run `pre-commit`
|
|
||||||
- pip install pre-commit==2.7.1
|
|
||||||
- pre-commit run --all-files --color always --verbose
|
|
||||||
- pre-commit run --color always --hook-stage manual --verbose commitlint-travis
|
|
||||||
|
|
||||||
## Define the rest of the matrix based on Kitchen testing
|
## Define the rest of the matrix based on Kitchen testing
|
||||||
# Make sure the instances listed below match up with
|
# Make sure the instances listed below match up with
|
||||||
@ -254,14 +216,16 @@ jobs:
|
|||||||
# Run `semantic-release`
|
# Run `semantic-release`
|
||||||
script: 'npx semantic-release@15.14'
|
script: 'npx semantic-release@15.14'
|
||||||
|
|
||||||
|
# yamllint disable rule:line-length
|
||||||
# Notification options: `always`, `never` or `change`
|
# Notification options: `always`, `never` or `change`
|
||||||
notifications:
|
notifications:
|
||||||
webhooks:
|
webhooks:
|
||||||
if: 'repo = saltstack-formulas/apache-formula'
|
if: 'repo = saltstack-formulas/apache-formula OR repo = myii/apache-formula'
|
||||||
urls:
|
urls:
|
||||||
- https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Fapache-formula&ignore_pull_requests=true
|
- https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=master%2F2021-W37a&ignore_pull_requests=true
|
||||||
on_success: always # default: always
|
on_success: always # default: always
|
||||||
on_failure: always # default: always
|
on_failure: always # default: always
|
||||||
on_start: always # default: never
|
on_start: never # default: never
|
||||||
on_cancel: always # default: always
|
on_cancel: always # default: always
|
||||||
on_error: always # default: always
|
on_error: always # default: always
|
||||||
|
# yamllint enable rule:line-length
|
||||||
|
22
Gemfile.lock
22
Gemfile.lock
@ -1,17 +1,17 @@
|
|||||||
GIT
|
GIT
|
||||||
remote: https://gitlab.com/saltstack-formulas/infrastructure/inspec
|
remote: https://gitlab.com/saltstack-formulas/infrastructure/inspec
|
||||||
revision: 2654d96e9567010c80908b15e07b0c63220abda9
|
revision: 9a3c06719f3a209f34212151883fda40787a1626
|
||||||
branch: ssf
|
branch: ssf
|
||||||
specs:
|
specs:
|
||||||
inspec (4.41.20)
|
inspec (4.46.4)
|
||||||
faraday_middleware (>= 0.12.2, < 1.1)
|
faraday_middleware (>= 0.12.2, < 1.1)
|
||||||
inspec-core (= 4.41.20)
|
inspec-core (= 4.46.4)
|
||||||
mongo (= 2.13.2)
|
mongo (= 2.13.2)
|
||||||
train (~> 3.0)
|
train (~> 3.0)
|
||||||
train-aws (~> 0.2)
|
train-aws (~> 0.2)
|
||||||
train-habitat (~> 0.1)
|
train-habitat (~> 0.1)
|
||||||
train-winrm (~> 0.2)
|
train-winrm (~> 0.2)
|
||||||
inspec-core (4.41.20)
|
inspec-core (4.46.4)
|
||||||
addressable (~> 2.4)
|
addressable (~> 2.4)
|
||||||
chef-telemetry (~> 1.0, >= 1.0.8)
|
chef-telemetry (~> 1.0, >= 1.0.8)
|
||||||
faraday (>= 0.9.0, < 1.5)
|
faraday (>= 0.9.0, < 1.5)
|
||||||
@ -55,7 +55,7 @@ GEM
|
|||||||
addressable (2.8.0)
|
addressable (2.8.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
aws-eventstream (1.2.0)
|
aws-eventstream (1.2.0)
|
||||||
aws-partitions (1.497.0)
|
aws-partitions (1.501.0)
|
||||||
aws-sdk-alexaforbusiness (1.50.0)
|
aws-sdk-alexaforbusiness (1.50.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
@ -83,7 +83,7 @@ GEM
|
|||||||
aws-sdk-budgets (1.41.0)
|
aws-sdk-budgets (1.41.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-cloudformation (1.57.0)
|
aws-sdk-cloudformation (1.58.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-cloudfront (1.56.0)
|
aws-sdk-cloudfront (1.56.0)
|
||||||
@ -139,10 +139,10 @@ GEM
|
|||||||
aws-sdk-dynamodb (1.63.0)
|
aws-sdk-dynamodb (1.63.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-ec2 (1.261.0)
|
aws-sdk-ec2 (1.262.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-ecr (1.45.0)
|
aws-sdk-ecr (1.46.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-ecrpublic (1.6.0)
|
aws-sdk-ecrpublic (1.6.0)
|
||||||
@ -187,7 +187,7 @@ GEM
|
|||||||
aws-sdk-iam (1.60.0)
|
aws-sdk-iam (1.60.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-kafka (1.39.0)
|
aws-sdk-kafka (1.40.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-kinesis (1.35.0)
|
aws-sdk-kinesis (1.35.0)
|
||||||
@ -214,7 +214,7 @@ GEM
|
|||||||
aws-sdk-ram (1.26.0)
|
aws-sdk-ram (1.26.0)
|
||||||
aws-sdk-core (~> 3, >= 3.112.0)
|
aws-sdk-core (~> 3, >= 3.112.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-rds (1.126.0)
|
aws-sdk-rds (1.127.0)
|
||||||
aws-sdk-core (~> 3, >= 3.120.0)
|
aws-sdk-core (~> 3, >= 3.120.0)
|
||||||
aws-sigv4 (~> 1.1)
|
aws-sigv4 (~> 1.1)
|
||||||
aws-sdk-redshift (1.69.0)
|
aws-sdk-redshift (1.69.0)
|
||||||
@ -407,7 +407,7 @@ GEM
|
|||||||
net-ssh (>= 4.0.0)
|
net-ssh (>= 4.0.0)
|
||||||
nori (2.6.0)
|
nori (2.6.0)
|
||||||
os (1.1.1)
|
os (1.1.1)
|
||||||
parallel (1.20.1)
|
parallel (1.21.0)
|
||||||
parslet (1.8.2)
|
parslet (1.8.2)
|
||||||
pastel (0.8.0)
|
pastel (0.8.0)
|
||||||
tty-color (~> 0.5)
|
tty-color (~> 0.5)
|
||||||
|
@ -8,6 +8,9 @@ driver:
|
|||||||
privileged: true
|
privileged: true
|
||||||
run_command: /usr/lib/systemd/systemd
|
run_command: /usr/lib/systemd/systemd
|
||||||
|
|
||||||
|
# Using the commit title as a comment to guarantee change for new commit/push:
|
||||||
|
# ci: test for upstream Salt regressions in '`'master'`' instances (2021-W37a)
|
||||||
|
|
||||||
provisioner:
|
provisioner:
|
||||||
name: salt_solo
|
name: salt_solo
|
||||||
log_level: debug
|
log_level: debug
|
||||||
|
Loading…
Reference in New Issue
Block a user