0
0
mirror of https://github.com/saltstack-formulas/sysctl-formula.git synced 2024-11-27 23:07:54 +01:00

ci(gitlab-ci): add rubocop linter (with allow_failure) [skip ci]

* Automated using https://github.com/myii/ssf-formula/pull/277
This commit is contained in:
Imran Iqbal 2020-12-19 14:36:03 +00:00
parent 132804c09a
commit 26352ffede
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819

View File

@ -18,6 +18,7 @@
image_precommit: &image_precommit image_precommit: &image_precommit
name: 'myii/ssf-pre-commit:2.9.2' name: 'myii/ssf-pre-commit:2.9.2'
entrypoint: ['/bin/bash', '-c'] entrypoint: ['/bin/bash', '-c']
image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest'
image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14' image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14'
# `services` # `services`
services_docker_dind: &services_docker_dind services_docker_dind: &services_docker_dind
@ -84,6 +85,19 @@ pre-commit:
script: script:
- 'pre-commit run --all-files --color always --verbose' - 'pre-commit run --all-files --color always --verbose'
# Use a separate job for `rubocop` other than the one potentially run by `pre-commit`
# - The `pre-commit` check will only be available for formulas that pass the default
# `rubocop` check -- and must continue to do so
# - This job is allowed to fail, so can be used for all formulas
# - Furthermore, this job uses all of the latest `rubocop` features & cops,
# which will help when upgrading the `rubocop` linter used in `pre-commit`
rubocop:
allow_failure: true
stage: *stage_lint
image: *image_rubocop
script:
- 'rubocop -d -P -S --enable-pending-cops'
############################################################################### ###############################################################################
# Define `test` template # Define `test` template
############################################################################### ###############################################################################