Commit 66547cf8 authored by Jan-Tarek Butt's avatar Jan-Tarek Butt
Browse files

CI: add yamllint to CI pipeline


Signed-off-by: Jan-Tarek Butt's avatarJan-Tarek Butt <tarek@ring0.de>
parent ee9a1027
Pipeline #2026 failed with stages
in 1 minute and 29 seconds
---
extends: default
rules:
line-length:
level: error
max: 100
allow-non-breakable-inline-mappings: true
#!/bin/sh
echo "Doing yamllint..."
ret=0
# explicitly set IFS to contain only a line feed
IFS='
'
filelist="$(find . -not \( -path './.git/*' -prune \) -type f ! -name "$(printf '*\n*')")"
for line in $filelist; do
if echo "$line" | grep -q -E '.*\.(yml|yaml)' ; then
if ! grep -q "$line" ".ci/shell_accepted"; then
tmp="$(yamllint --strict -d ./.ci/yaml_rules.yaml "$line")"
if ! [ "$tmp" = "" ]; then
echo "$tmp"
ret=1
fi
fi
fi
done
exit $ret
stages:
- lint
- build
- deploy
- production
lint:
stage: lint
image:
name: cytopia/yamllint
script:
- ./.ci/yamllint.sh
build:
stage: build
image:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment