From 416543d33e5ff32825892fe7761ed76860fdde00 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Wed, 23 Mar 2022 02:01:41 +0000 Subject: [PATCH] Add extra linting to validate json files --- .gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 708bb257..a8d456e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,20 @@ variables: DOCKER_HOST: tcp://docker:2376 DOCKER_TLS_CERTDIR: "/certs" +jsonlint: + stage: lint + image: registry.gitlab.com/pipeline-components/jsonlint:latest + tags: + - 'docker' + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS' + when: never + script: + - | + find . -not -path './.git/*' -name '*.json' -type f -print0 | + parallel --will-cite -k -0 -n1 jsonlint -q + black: stage: lint image: registry.gitlab.com/pipeline-components/black:latest