test reference

This commit is contained in:
2024-05-05 13:32:48 -05:00
parent 45b1ba0cc9
commit fee65cfac6
5 changed files with 17 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ version:
extends: .version
stage: .pre
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
- !reference [.default_rules, rules]
secret_detection:
stage: validate
@@ -27,6 +27,4 @@ sonarqube:
stage: validate
allow_failure: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' || $CI_MERGE_REQUEST_IID
exists:
- "sonar-project.properties"
- !reference [.sonarqube_rules, rules]

View File

@@ -31,6 +31,6 @@ docker-push:
- job: version
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
- if: $CI_PIPELINE_SOURCE == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
exists:
- "Dockerfile"

View File

@@ -15,7 +15,7 @@ generate_sbom:
optional: true
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' || $CI_MERGE_REQUEST_IID
- !reference [.default_rules, mr-rules]
generate_cve:
extends: .generate_cve
@@ -24,4 +24,4 @@ generate_cve:
- job: generate_sbom
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/' || $CI_MERGE_REQUEST_IID
- !reference [.default_rules, mr-rules]

3
rules/mr-rules.yml Normal file
View File

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

9
rules/rules.yml Normal file
View File

@@ -0,0 +1,9 @@
.default_rules:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
.sonarqube_rules:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
exists:
- "sonar-project.properties"