diff options
| author | Diederik de Haas <didi.debian@cknow.org> | 2022-11-11 19:05:57 +0100 |
|---|---|---|
| committer | Diederik de Haas <didi.debian@cknow.org> | 2022-11-11 19:52:12 +0100 |
| commit | 76fb71f4b16e540b052d04d31085613f1c3acbc4 (patch) | |
| tree | 70b806aebfe3f1e0b62a05972189b5247caedf8a | |
| parent | 90cc651d17cd2788717bdeeeffc40c05fe4a679f (diff) | |
ci: Add 'check yamls' job in (new) 'check input' stage
Add a new stage 'check input' to our CI configuration to check whether
our input files contain errors.
The first check is for the YAML files whether they contain errors or
warnings according to 'yamllint'.
Add 'yamllint' config file to not consider too long lines as errors.
And fix the errors/warnings in 'salsa-ci.yml' itself.
Apparently job names can contain space, so rename 'build-yamls' to
'build yamls'.
| -rw-r--r-- | debian/salsa-ci.yml | 15 | ||||
| -rw-r--r-- | debian/yamllint.yml | 6 |
2 files changed, 19 insertions, 2 deletions
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index 13138a1..f43a844 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -1,4 +1,7 @@ +--- stages: + # Garbage in is garbage out, so verify our input + - check input - build variables: @@ -7,7 +10,16 @@ variables: SALSA_CI_IMAGES: registry.salsa.debian.org/salsa-ci-team/pipeline BASE_CI_IMAGES: ${SALSA_CI_IMAGES}/base -build-yamls: +check yamls: + stage: check input + image: $BASE_CI_IMAGES:unstable + dependencies: [] + script: + - apt-get update && apt-get upgrade -y + - apt-get install -y yamllint + - yamllint -c debian/yamllint.yml . + +build yamls: stage: build image: $BASE_CI_IMAGES:unstable dependencies: [] @@ -20,4 +32,3 @@ build-yamls: artifacts: paths: - build/ - diff --git a/debian/yamllint.yml b/debian/yamllint.yml new file mode 100644 index 0000000..53974a0 --- /dev/null +++ b/debian/yamllint.yml @@ -0,0 +1,6 @@ +--- + +extends: default + +rules: + line-length: disable |
