Skip to content

Lint more YAML files in CI

David Dieulivol requested to merge 359968-lint_more_yaml_files into master

Context

Closes #359968 (closed)

What does this MR do?

Rationale

To consider

  • It might be too much to run the YAML job every time a YAML file for changed...
  • Ideally, there would be a way to run the linting only on the files that got changed, but I could not find it.

How to set up and validate

remotely

I've created an MR to test out the changes in this branch. You can have a look at the pipelines for this MR:

locally

cd <your-local-gitlab-installation>

docker run -it \
  -e LINT_PATHS=".gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates data/deprecations data/removals data/whats_new" \
  -v $PWD:/code \
  registry.gitlab.com/pipeline-components/yamllint:latest sh

# Run default linting
yamllint --strict -f colored .

# Run pipeline linting
yamllint -d "{extends: default, rules: {line-length: disable, document-start: disable}}" $LINT_PATHS

echo $?
Edited by Lin Jen-Shin

Merge request reports