repository-beta/.gitlab-ci.yml
2018-05-09 22:47:36 +02:00

36 lines
592 B
YAML

---
image: docker:stable
stages:
- linting
.linting: &linting
stage: linting
tags:
- linting
yamllint:
<<: *linting
image: sdesbure/yamllint
before_script:
- yamllint --version
script:
- yamllint .
jsonlint:
<<: *linting
image: sahsu/docker-jsonlint
before_script:
- jsonlint --version || true
script:
- |
for file in $(find . -type f -name "*.json"); do
if ! jsonlint -q $file; then
export FAILED=1
else
echo "$file OK"
fi
done
if [ "${FAILED}" = "1" ]; then
exit 1
fi