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