Skip to content

Commit 775dbe8

Browse files
committed
SCANPY-201 Only executes shadow analysis on CRON jobs and master branch
1 parent 2f20f71 commit 775dbe8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.cirrus.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
# Use bash (instead of sh on linux or cmd.exe on windows)
1313
CIRRUS_SHELL: bash
1414
JF_ALIAS: "jfrog"
15+
CRON_NIGHTLY_JOB_NAME: "nightly"
1516

1617
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH =~ "branch-.*")
1718
linux_container_definition: &LINUX_CONTAINER_DEFINITION
@@ -183,6 +184,8 @@ analysis_next_task:
183184

184185
analysis_SQC_EU_shadow_task:
185186
<<: *ANALYSIS_BASE_LINUX_TEMPLATE
187+
# only executed in CRON job AND on master branch
188+
only_if: $CIRRUS_CRON == $CRON_NIGHTLY_JOB_NAME && $CIRRUS_BRANCH == "master"
186189
alias: sonar_analysis_shadow_sqc_eu
187190
name: "SQC-EU Shadow Analysis"
188191
env:
@@ -191,6 +194,8 @@ analysis_SQC_EU_shadow_task:
191194

192195
analysis_SQC_US_shadow_task:
193196
<<: *ANALYSIS_BASE_LINUX_TEMPLATE
197+
# only executed in CRON job AND on master branch
198+
only_if: $CIRRUS_CRON == $CRON_NIGHTLY_JOB_NAME && $CIRRUS_BRANCH == "master"
194199
alias: sonar_analysis_shadow_sqc_us
195200
name: "SQC-US Shadow Analysis"
196201
env:
@@ -296,8 +301,6 @@ promote_task:
296301
depends_on:
297302
- formatting
298303
- sonar_analysis_next
299-
- sonar_analysis_shadow_sqc_eu
300-
- sonar_analysis_shadow_sqc_us
301304
- qa
302305
- qa_windows
303306
- build

0 commit comments

Comments
 (0)