Skip to content

Commit 5e100a6

Browse files
committed
Prevent the promote task to run on tags
Having two times the `only_if` element will make the second one override the first. I didn't find a way to avoid the duplication.
1 parent 6a1f3e2 commit 5e100a6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.cirrus.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ ec2_instance: &EC2_INSTANCE_WINDOWS
4545
only_sonarsource_qa: &ONLY_SONARSOURCE_QA
4646
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BUILD_SOURCE == 'api' )
4747

48-
except_nightly_cron: &EXCEPT_ON_NIGHTLY_CRON
49-
only_if: $CIRRUS_CRON != $NIGHTLY_CRON
48+
except_nightly_cron: &ONLY_SONARSOURCE_QA_EXCEPT_ON_NIGHTLY_CRON
49+
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BUILD_SOURCE == 'api' ) && $CIRRUS_CRON != $NIGHTLY_CRON
5050

5151
#
5252
# TASKS
@@ -144,8 +144,7 @@ promote_task:
144144
depends_on:
145145
- linux_qa_java17
146146
- win_qa_java17
147-
<<: *ONLY_SONARSOURCE_QA
148-
<<: *EXCEPT_ON_NIGHTLY_CRON
147+
<<: *ONLY_SONARSOURCE_QA_EXCEPT_ON_NIGHTLY_CRON
149148
eks_container:
150149
<<: *EKS_CONTAINER
151150
cpu: 0.5

0 commit comments

Comments
 (0)