ci(pre-commit): update hook for rubocop

* Automated using https://github.com/myii/ssf-formula/pull/290
This commit is contained in:
Imran Iqbal 2021-02-01 22:20:23 +00:00
parent 22c647eb5c
commit 2c090c3a83
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
3 changed files with 30 additions and 89 deletions

View File

@ -48,30 +48,30 @@ variables:
############################################################################### ###############################################################################
# `lint` stage: `commitlint` & `pre-commit` # `lint` stage: `commitlint` & `pre-commit`
############################################################################### ###############################################################################
commitlint: # commitlint:
stage: *stage_lint # stage: *stage_lint
image: *image_commitlint # image: *image_commitlint
script: # script:
# Add `upstream` remote to get access to `upstream/master` # # Add `upstream` remote to get access to `upstream/master`
- 'git remote add upstream # - 'git remote add upstream
https://gitlab.com/saltstack-formulas/apache-formula.git' # https://gitlab.com/saltstack-formulas/apache-formula.git'
- 'git fetch --all' # - 'git fetch --all'
# Set default commit hashes for `--from` and `--to` # # Set default commit hashes for `--from` and `--to`
- 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"' # - 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"'
- 'export COMMITLINT_TO="${CI_COMMIT_SHA}"' # - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"'
# `coqbot` adds a merge commit to test PRs on top of the latest commit in # # `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 # # the repo; amend this merge commit message to avoid failure
- | # - |
if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \ # if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \
&& [ "${CI_COMMIT_BRANCH}" != "master" ]; then # && [ "${CI_COMMIT_BRANCH}" != "master" ]; then
git commit --amend -m \ # git commit --amend -m \
'chore: reword coqbot merge commit message for commitlint' # 'chore: reword coqbot merge commit message for commitlint'
export COMMITLINT_TO=HEAD # export COMMITLINT_TO=HEAD
fi # fi
# Run `commitlint` # # Run `commitlint`
- 'commitlint --from "${COMMITLINT_FROM}" # - 'commitlint --from "${COMMITLINT_FROM}"
--to "${COMMITLINT_TO}" # --to "${COMMITLINT_TO}"
--verbose' # --verbose'
pre-commit: pre-commit:
stage: *stage_lint stage: *stage_lint
@ -123,68 +123,6 @@ rubocop:
## 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
# the `platforms` defined in `kitchen.yml` # the `platforms` defined in `kitchen.yml`
# default-debian-10-master-py3: {extends: '.test_instance'}
modules-debian-10-master-py3: {extends: '.test_instance'}
# default-ubuntu-1804-master-py3: {extends: '.test_instance'}
# modules-ubuntu-1804-master-py3: {extends: '.test_instance'}
# default-centos-8-master-py3: {extends: '.test_instance'}
modules-centos-8-master-py3: {extends: '.test_instance'}
# default-fedora-31-master-py3: {extends: '.test_instance'}
modules-fedora-31-master-py3: {extends: '.test_instance'}
# default-opensuse-leap-151-master-py3: {extends: '.test_instance'}
modules-opensuse-leap-151-master-py3: {extends: '.test_instance'}
# https://community.letsencrypt.org/t/localhost-crt-does-not-exist-or-is-empty/103979
default-amazonlinux-2-master-py3: {extends: '.test_instance'}
# modules-amazonlinux-2-master-py3: {extends: '.test_instance'}
# default-debian-10-2019-2-py3: {extends: '.test_instance'}
# modules-debian-10-2019-2-py3: {extends: '.test_instance'}
# default-debian-9-2019-2-py3: {extends: '.test_instance'}
# modules-debian-9-2019-2-py3: {extends: '.test_instance'}
# default-ubuntu-1804-2019-2-py3: {extends: '.test_instance'}
modules-ubuntu-1804-2019-2-py3: {extends: '.test_instance'}
# default-centos-8-2019-2-py3: {extends: '.test_instance'}
# modules-centos-8-2019-2-py3: {extends: '.test_instance'}
# default-fedora-31-2019-2-py3: {extends: '.test_instance'}
# modules-fedora-31-2019-2-py3: {extends: '.test_instance'}
# default-opensuse-leap-151-2019-2-py3: {extends: '.test_instance'}
# modules-opensuse-leap-151-2019-2-py3: {extends: '.test_instance'}
# default-centos-7-2019-2-py2: {extends: '.test_instance'}
modules-centos-7-2019-2-py2: {extends: '.test_instance'}
# default-amazonlinux-2-2019-2-py3: {extends: '.test_instance'}
# modules-amazonlinux-2-2019-2-py3: {extends: '.test_instance'}
# default-arch-base-latest-2019-2-py2: {extends: '.test_instance'}
# modules-arch-base-latest-2019-2-py2: {extends: '.test_instance'}
# arch-arch-base-latest-2019-2-py2: {extends: '.test_instance'}
# default-fedora-30-2018-3-py3: {extends: '.test_instance'}
# modules-fedora-30-2018-3-py3: {extends: '.test_instance'}
# default-debian-9-2018-3-py2: {extends: '.test_instance'}
# modules-debian-9-2018-3-py2: {extends: '.test_instance'}
# default-ubuntu-1604-2018-3-py2: {extends: '.test_instance'}
# modules-ubuntu-1604-2018-3-py2: {extends: '.test_instance'}
# default-centos-7-2018-3-py2: {extends: '.test_instance'}
# modules-centos-7-2018-3-py2: {extends: '.test_instance'}
# default-opensuse-leap-151-2018-3-py2: {extends: '.test_instance'}
# modules-opensuse-leap-151-2018-3-py2: {extends: '.test_instance'}
# default-amazonlinux-1-2018-3-py2: {extends: '.test_instance'}
# modules-amazonlinux-1-2018-3-py2: {extends: '.test_instance'}
# default-arch-base-latest-2018-3-py2: {extends: '.test_instance'}
# modules-arch-base-latest-2018-3-py2: {extends: '.test_instance'}
# arch-arch-base-latest-2018-3-py2: {extends: '.test_instance'}
# default-debian-8-2017-7-py2: {extends: '.test_instance'}
# modules-debian-8-2017-7-py2: {extends: '.test_instance'}
# default-ubuntu-1604-2017-7-py2: {extends: '.test_instance'}
# modules-ubuntu-1604-2017-7-py2: {extends: '.test_instance'}
# default-centos-6-2017-7-py2: {extends: '.test_instance'}
# modules-centos-6-2017-7-py2: {extends: '.test_instance'}
# default-fedora-30-2017-7-py2: {extends: '.test_instance'}
# modules-fedora-30-2017-7-py2: {extends: '.test_instance'}
# default-opensuse-leap-151-2017-7-py2: {extends: '.test_instance'}
# modules-opensuse-leap-151-2017-7-py2: {extends: '.test_instance'}
# default-amazonlinux-1-2017-7-py2: {extends: '.test_instance'}
# modules-amazonlinux-1-2017-7-py2: {extends: '.test_instance'}
# default-arch-base-latest-2017-7-py2: {extends: '.test_instance'}
# modules-arch-base-latest-2017-7-py2: {extends: '.test_instance'}
arch-arch-base-latest-2017-7-py2: {extends: '.test_instance'}
############################################################################### ###############################################################################
# `release` stage: `semantic-release` # `release` stage: `semantic-release`

View File

@ -17,8 +17,8 @@ repos:
stages: [manual] stages: [manual]
additional_dependencies: ['@commitlint/config-conventional@8.3.4'] additional_dependencies: ['@commitlint/config-conventional@8.3.4']
always_run: true always_run: true
- repo: https://github.com/adithyabsk/mirrors-rubocop - repo: https://github.com/rubocop-hq/rubocop
rev: v0.91.0 rev: v1.9.1
hooks: hooks:
- id: rubocop - id: rubocop
name: Check Ruby files with rubocop name: Check Ruby files with rubocop
@ -33,7 +33,7 @@ repos:
files: ^.*\.(sh|bash|ksh)$ files: ^.*\.(sh|bash|ksh)$
types: [] types: []
args: [] args: []
- repo: https://github.com/adrienverge/yamllint.git - repo: https://github.com/adrienverge/yamllint
rev: v1.23.0 rev: v1.23.0
hooks: hooks:
- id: yamllint - id: yamllint

View File

@ -15,8 +15,11 @@
/docs/AUTHORS.rst @saltstack-formulas/ssf /docs/AUTHORS.rst @saltstack-formulas/ssf
/docs/CHANGELOG.rst @saltstack-formulas/ssf /docs/CHANGELOG.rst @saltstack-formulas/ssf
/docs/TOFS_pattern.rst @saltstack-formulas/ssf /docs/TOFS_pattern.rst @saltstack-formulas/ssf
/*/_mapdata/ @saltstack-formulas/ssf
/*/libsaltcli.jinja @saltstack-formulas/ssf /*/libsaltcli.jinja @saltstack-formulas/ssf
/*/libtofs.jinja @saltstack-formulas/ssf /*/libtofs.jinja @saltstack-formulas/ssf
/test/integration/**/_mapdata_spec.rb @saltstack-formulas/ssf
/test/integration/**/libraries/system.rb @saltstack-formulas/ssf
/test/integration/**/inspec.yml @saltstack-formulas/ssf /test/integration/**/inspec.yml @saltstack-formulas/ssf
/test/integration/**/README.md @saltstack-formulas/ssf /test/integration/**/README.md @saltstack-formulas/ssf
/.gitignore @saltstack-formulas/ssf /.gitignore @saltstack-formulas/ssf