From 5bb3bfee301605e97f4c4c70432f34fd30b25cec Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 13 May 2018 17:19:39 +0200 Subject: [PATCH] :sparkles: Adds Gitlab CI --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..9270c40f --- /dev/null +++ b/.gitlab-ci.yml @@ -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 +