2022-05-30 11:08:03 -04:00
|
|
|
# Yamllint of yaml files.
|
|
|
|
|
2019-06-05 12:31:35 -04:00
|
|
|
# This uses rules from project root `.yamllint`.
|
2020-10-29 08:08:50 -04:00
|
|
|
lint-yaml:
|
2022-05-30 11:08:03 -04:00
|
|
|
extends:
|
|
|
|
- .default-retry
|
|
|
|
- .yaml-lint:rules
|
|
|
|
image: pipelinecomponents/yamllint:latest
|
|
|
|
stage: lint
|
|
|
|
needs: []
|
|
|
|
script:
|
|
|
|
- yamllint --strict -f colored .
|
|
|
|
|
|
|
|
# The jobs below will not use the configuration present in `.yamllint` (it's because of the -d option)
|
|
|
|
#
|
|
|
|
# Docs: https://yamllint.readthedocs.io/en/stable/configuration.html#custom-configuration-without-a-config-file
|
|
|
|
|
|
|
|
lint-pipeline-yaml:
|
2019-08-26 16:41:55 -04:00
|
|
|
extends:
|
|
|
|
- .default-retry
|
2022-06-16 08:09:26 -04:00
|
|
|
- .lint-pipeline-yaml:rules
|
2020-07-05 02:09:05 -04:00
|
|
|
image: pipelinecomponents/yamllint:latest
|
2021-11-01 05:13:14 -04:00
|
|
|
stage: lint
|
2020-02-20 13:08:51 -05:00
|
|
|
needs: []
|
2020-01-10 13:07:43 -05:00
|
|
|
variables:
|
2022-03-10 16:08:21 -05:00
|
|
|
LINT_PATHS: .gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates data/deprecations data/removals data/whats_new
|
2019-06-05 12:31:35 -04:00
|
|
|
script:
|
2022-05-30 11:08:03 -04:00
|
|
|
- 'yamllint -d "{extends: default, rules: {line-length: disable, document-start: disable}}" $LINT_PATHS'
|
2022-03-28 17:07:58 -04:00
|
|
|
|
|
|
|
lint-metrics-yaml:
|
|
|
|
extends:
|
|
|
|
- .default-retry
|
2022-06-16 08:09:26 -04:00
|
|
|
- .lint-metrics-yaml:rules
|
2022-03-28 17:07:58 -04:00
|
|
|
image: pipelinecomponents/yamllint:latest
|
|
|
|
stage: lint
|
|
|
|
needs: []
|
|
|
|
variables:
|
|
|
|
LINT_PATHS: config/metrics
|
|
|
|
script:
|
|
|
|
- 'yamllint --strict -f colored -d "{extends: default, rules: {line-length: disable, document-start: disable, indentation: {spaces: 2, indent-sequences: whatever}}}" $LINT_PATHS'
|