2022-05-30 15:08:03 +00:00
|
|
|
# Yamllint of yaml files.
|
|
|
|
|
2019-06-05 16:31:35 +00:00
|
|
|
# This uses rules from project root `.yamllint`.
|
2020-10-29 12:08:50 +00:00
|
|
|
lint-yaml:
|
2022-05-30 15:08:03 +00: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 20:41:55 +00:00
|
|
|
extends:
|
|
|
|
- .default-retry
|
2022-06-16 12:09:26 +00:00
|
|
|
- .lint-pipeline-yaml:rules
|
2020-07-05 06:09:05 +00:00
|
|
|
image: pipelinecomponents/yamllint:latest
|
2021-11-01 09:13:14 +00:00
|
|
|
stage: lint
|
2020-02-20 18:08:51 +00:00
|
|
|
needs: []
|
2020-01-10 18:07:43 +00:00
|
|
|
variables:
|
2022-03-10 21:08:21 +00:00
|
|
|
LINT_PATHS: .gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates data/deprecations data/removals data/whats_new
|
2019-06-05 16:31:35 +00:00
|
|
|
script:
|
2022-05-30 15:08:03 +00:00
|
|
|
- 'yamllint -d "{extends: default, rules: {line-length: disable, document-start: disable}}" $LINT_PATHS'
|
2022-03-28 21:07:58 +00:00
|
|
|
|
|
|
|
lint-metrics-yaml:
|
|
|
|
extends:
|
|
|
|
- .default-retry
|
2022-06-16 12:09:26 +00:00
|
|
|
- .lint-metrics-yaml:rules
|
2022-03-28 21:07:58 +00: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'
|