mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Change trigger rules for CQ
This should fix the failed to load CQ Report issue on MRs Also add links to tools used
This commit is contained in:
parent
087e28c1fc
commit
3081877c5f
@ -1,54 +1,54 @@
|
|||||||
# YAML Linting
|
# YAML Linting [https://yamllint.readthedocs.io/en/latest/]
|
||||||
yamllint:
|
yamllint:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: registry.gitlab.com/pipeline-components/yamllint:latest
|
image: registry.gitlab.com/pipeline-components/yamllint:latest
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
- if: "$CODE_QUALITY_DISABLED"
|
||||||
- if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS"
|
|
||||||
when: never
|
when: never
|
||||||
|
- if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"
|
||||||
script:
|
script:
|
||||||
- yamllint .
|
- yamllint .
|
||||||
|
|
||||||
# JSON Linting
|
# JSON Linting [https://github.com/zaach/jsonlint]
|
||||||
jsonlint:
|
jsonlint:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: registry.gitlab.com/pipeline-components/jsonlint:latest
|
image: registry.gitlab.com/pipeline-components/jsonlint:latest
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
- if: "$CODE_QUALITY_DISABLED"
|
||||||
- if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS"
|
|
||||||
when: never
|
when: never
|
||||||
|
- if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
find . -not -path './.git/*' -name '*.json' -type f -print0 |
|
find . -not -path './.git/*' -name '*.json' -type f -print0 |
|
||||||
parallel --will-cite -k -0 -n1 jsonlint -q
|
parallel --will-cite -k -0 -n1 jsonlint -q
|
||||||
|
|
||||||
# Code Format Checking
|
# Code Format Checking [https://black.readthedocs.io/en/stable/]
|
||||||
black:
|
black:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: registry.gitlab.com/pipeline-components/black:latest
|
image: registry.gitlab.com/pipeline-components/black:latest
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
- if: "$CODE_QUALITY_DISABLED"
|
||||||
- if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS"
|
|
||||||
when: never
|
when: never
|
||||||
|
- if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"
|
||||||
script:
|
script:
|
||||||
- black --check --verbose -- .
|
- black --check --verbose -- .
|
||||||
|
|
||||||
# Code Climate/Quality Checking
|
# Code Climate/Quality Checking [https://pylint.pycqa.org/en/latest/]
|
||||||
pylint:
|
pylint:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: registry.gitlab.com/pipeline-components/pylint:latest
|
image: registry.gitlab.com/pipeline-components/pylint:latest
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
- if: "$CODE_QUALITY_DISABLED"
|
||||||
- if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS"
|
|
||||||
when: never
|
when: never
|
||||||
|
- if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p public/badges public/lint
|
- mkdir -p public/badges public/lint
|
||||||
- echo undefined > public/badges/$CI_JOB_NAME.score
|
- echo undefined > public/badges/$CI_JOB_NAME.score
|
||||||
|
Loading…
Reference in New Issue
Block a user