Skip to content

Commit 9b6b2d3

Browse files
authored
feat(ci): Trigger static quality gate only on agent changes (#45947)
### What does this PR do? Changes the static quality gate CI job to only run when there are actual agent artifact changes, rather than running on all dev branches. The job now uses `.on_dev_branches_with_artifact_changes` instead of `.on_dev_branches` combined with `when: on_success`. ### Motivation The static quality gate job was running on all dev branches regardless of whether there were actual changes to agent artifacts. This change optimizes CI resources by only triggering this job when relevant changes are made. ### Describe how you validated your changes - Reviewed the change to ensure the correct rule reference is used - The `.on_dev_branches_with_artifact_changes` rule is an existing reference used elsewhere in the CI configuration ### Additional Notes This is a CI optimization to reduce unnecessary job runs. Co-authored-by: nicolas.schweitzer <nicolas.schweitzer@datadoghq.com>
1 parent 1ad328d commit 9b6b2d3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.gitlab/test/functional_test/static_quality_gate.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ static_quality_gates:
33
rules:
44
- !reference [.except_coverage_pipeline] # Coverage pipeline creates a special artifact that will not pass the quality gate
55
- !reference [.on_main_or_release_branch]
6-
- !reference [.on_dev_branches]
7-
- when: on_success
6+
- !reference [.on_dev_branches_with_artifact_changes]
7+
- when: manual
8+
allow_failure: true
89
image: registry.ddbuild.io/ci/datadog-agent-buildimages/docker_x64$CI_IMAGE_DOCKER_X64_SUFFIX:$CI_IMAGE_DOCKER_X64
910
tags: ["arch:amd64", "specific:true"]
1011
needs:
@@ -75,7 +76,7 @@ manual_gate_threshold_update:
7576
rules:
7677
- !reference [.except_coverage_pipeline] # Coverage pipeline creates a special artifact that will not pass the quality gate
7778
- !reference [.on_main_manual]
78-
- !reference [.on_dev_branches]
79+
- !reference [.on_dev_branches_with_artifact_changes]
7980
- when: manual
8081
allow_failure: true
8182
image: registry.ddbuild.io/ci/datadog-agent-buildimages/docker_x64$CI_IMAGE_DOCKER_X64_SUFFIX:$CI_IMAGE_DOCKER_X64

0 commit comments

Comments
 (0)