Adds Gitlab CI

This commit is contained in:
Franck Nijhof 2018-05-13 17:19:39 +02:00
parent 0f8b6f6a08
commit 5bb3bfee30
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

37
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,37 @@
---
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