]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Prevent the promote task to run on tags
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 30 May 2024 12:21:33 +0000 (14:21 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Fri, 7 Jun 2024 09:21:56 +0000 (11:21 +0200)
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.

.cirrus.yml

index a70cce5454bef8b7dc2aeb0fa0748a7a0d6d97f4..d7eabb308137c783f6d70b8154bad3b2893f2fdc 100644 (file)
@@ -45,8 +45,8 @@ ec2_instance: &EC2_INSTANCE_WINDOWS
 only_sonarsource_qa: &ONLY_SONARSOURCE_QA
   only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BUILD_SOURCE == 'api' )
 
-except_nightly_cron: &EXCEPT_ON_NIGHTLY_CRON
-  only_if: $CIRRUS_CRON != $NIGHTLY_CRON
+except_nightly_cron: &ONLY_SONARSOURCE_QA_EXCEPT_ON_NIGHTLY_CRON
+  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
 
 #
 # TASKS
@@ -144,8 +144,7 @@ promote_task:
   depends_on:
     - linux_qa_java17
     - win_qa_java17
-  <<: *ONLY_SONARSOURCE_QA
-  <<: *EXCEPT_ON_NIGHTLY_CRON
+  <<: *ONLY_SONARSOURCE_QA_EXCEPT_ON_NIGHTLY_CRON
   eks_container:
     <<: *EKS_CONTAINER
     cpu: 0.5