update rules

This commit is contained in:
2024-05-05 13:39:22 -05:00
parent 08039d982d
commit 30931618cc
5 changed files with 11 additions and 7 deletions

View File

@@ -17,4 +17,3 @@ include:
- 'pipelines/linter.yml' - 'pipelines/linter.yml'
- 'pipelines/security.yml' - 'pipelines/security.yml'
- 'rules/rules.yml' - 'rules/rules.yml'
- 'rules/mr-rules.yml'

View File

@@ -19,7 +19,7 @@ version:
secret_detection: secret_detection:
stage: validate stage: validate
rules: rules:
- if: $CI_MERGE_REQUEST_IID - !reference [.mr_only_rules, rules]
allow_failure: false allow_failure: false
sonarqube: sonarqube:

View File

@@ -14,7 +14,7 @@ gobuild:
extends: .golang-build extends: .golang-build
stage: build stage: build
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' || $CI_MERGE_REQUEST_IID - !reference [.default_mr_rules, rules]
exists: exists:
- "go.mod" - "go.mod"

View File

@@ -1,3 +0,0 @@
.default_mr_rules:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' || $CI_MERGE_REQUEST_IID

View File

@@ -4,6 +4,14 @@
.sonarqube_rules: .sonarqube_rules:
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' || $CI_MERGE_REQUEST_IID
exists: exists:
- "sonar-project.properties" - "sonar-project.properties"
.default_mr_rules:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' || $CI_MERGE_REQUEST_IID
.mr_only_rules:
rules:
- if: $CI_MERGE_REQUEST_IID