From 3081877c5f32d0a559dcd85b3828ea68217dc8f2 Mon Sep 17 00:00:00 2001 From: Zedifus Date: Fri, 10 Jun 2022 14:48:00 +0100 Subject: [PATCH] Change trigger rules for CQ This should fix the failed to load CQ Report issue on MRs Also add links to tools used --- .gitlab/lint.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitlab/lint.yml b/.gitlab/lint.yml index fe6aa0b3..a6c2c593 100644 --- a/.gitlab/lint.yml +++ b/.gitlab/lint.yml @@ -1,54 +1,54 @@ -# YAML Linting +# YAML Linting [https://yamllint.readthedocs.io/en/latest/] yamllint: stage: lint image: registry.gitlab.com/pipeline-components/yamllint:latest tags: - docker rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - - if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS" + - if: "$CODE_QUALITY_DISABLED" when: never + - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" script: - yamllint . -# JSON Linting +# JSON Linting [https://github.com/zaach/jsonlint] 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" + - if: "$CODE_QUALITY_DISABLED" when: never + - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" script: - | find . -not -path './.git/*' -name '*.json' -type f -print0 | parallel --will-cite -k -0 -n1 jsonlint -q -# Code Format Checking +# Code Format Checking [https://black.readthedocs.io/en/stable/] black: stage: lint image: registry.gitlab.com/pipeline-components/black:latest tags: - docker rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - - if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS" + - if: "$CODE_QUALITY_DISABLED" when: never + - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" script: - black --check --verbose -- . -# Code Climate/Quality Checking +# Code Climate/Quality Checking [https://pylint.pycqa.org/en/latest/] pylint: stage: lint image: registry.gitlab.com/pipeline-components/pylint:latest tags: - docker rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - - if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS" + - if: "$CODE_QUALITY_DISABLED" when: never + - if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH" before_script: - mkdir -p public/badges public/lint - echo undefined > public/badges/$CI_JOB_NAME.score