Skip to content

Commit

Permalink
[CI] Run MacOS build job only on main, release branches and omnibus c…
Browse files Browse the repository at this point in the history
…hanges (#22882)

[CI] Run MacOS build job only on main, release branches and omnibus changes
  • Loading branch information
amenasria authored Feb 20, 2024
1 parent 6a26db5 commit 6361fbd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
6 changes: 5 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1190,11 +1190,15 @@ workflow:
when: never
- <<: *if_auto_e2e

.on_omnibus_change:
.on_packaging_change:
- !reference [.except_mergequeue] # The prerequisites are not run in the mergequeue pipeline so we need to skip this rule
- changes:
paths:
- omnibus/**/*
- .gitlab-ci.yml
- .gitlab/package_build.yml
- release.json
- .gitlab/package_build/**/*
compare_to: main # TODO: use a variable, when this is supported https://gitlab.com/gitlab-org/gitlab/-/issues/369916

.on_go-version_change:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/binary_build/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ build_dogstatsd-binary_x64:
build_dogstatsd-binary_arm64:
rules:
- !reference [.on_all_builds_a7]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: binary_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand Down
8 changes: 4 additions & 4 deletions .gitlab/package_build/deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ agent_deb-arm64-a6:
extends: .agent_build_common_deb
rules:
- !reference [.on_all_builds_a6]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand Down Expand Up @@ -198,7 +198,7 @@ iot_agent_deb-arm64:
extends: .iot_agent_build_common_deb
rules:
- !reference [.on_all_builds_a7]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand All @@ -212,7 +212,7 @@ iot_agent_deb-armhf:
extends: .iot_agent_build_common_deb
rules:
- !reference [.on_all_builds_a7]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_armhf$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand Down Expand Up @@ -254,7 +254,7 @@ dogstatsd_deb-x64:
dogstatsd_deb-arm64:
rules:
- !reference [.on_all_builds_a7]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand Down
4 changes: 3 additions & 1 deletion .gitlab/package_build/dmg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
agent_dmg-x64-a7:
extends: .agent_build_common_dmg
rules:
- !reference [.on_a7]
- !reference [.on_packaging_change]
- !reference [.on_main_or_release_branch]
- !reference [.on_all_builds]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
Expand Down
8 changes: 4 additions & 4 deletions .gitlab/package_build/rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ agent_rpm-arm64-a6:
extends: .agent_build_common_rpm
rules:
- !reference [.on_all_builds_a6]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_arm64$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand All @@ -108,7 +108,7 @@ agent_rpm-arm64-a7:
extends: .agent_build_common_rpm
rules:
- !reference [.on_all_builds_a7]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_arm64$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand Down Expand Up @@ -173,7 +173,7 @@ iot_agent_rpm-arm64:
extends: .iot_agent_build_common_rpm
rules:
- !reference [.on_all_builds_a7]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_arm64$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand All @@ -184,7 +184,7 @@ iot_agent_rpm-armhf:
extends: .iot_agent_build_common_rpm
rules:
- !reference [.on_all_builds_a7]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_armhf$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/package_build/suse_rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ agent_suse-arm64-a7:
extends: .agent_build_common_suse_rpm
rules:
- !reference [.on_all_builds_a7]
- !reference [.on_omnibus_change]
- !reference [.on_packaging_change]
- !reference [.on_go-version_change]
stage: package_build
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_arm64$DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX:$DATADOG_AGENT_ARMBUILDIMAGES
Expand Down

0 comments on commit 6361fbd

Please sign in to comment.