Skip to content

Commit d07dd29

Browse files
committed
SCANPY-201 Only executes shadow analysis on CRON jobs and master branch
1 parent 0d2847a commit d07dd29

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.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
@@ -185,6 +186,8 @@ analysis_next_task:
185186

186187
analysis_SQC_EU_shadow_task:
187188
<<: *ANALYSIS_BASE_LINUX_TEMPLATE
189+
# only executed in CRON job AND on master branch
190+
only_if: $CIRRUS_CRON == $CRON_NIGHTLY_JOB_NAME && $CIRRUS_BRANCH == "master"
188191
alias: sonar_analysis_shadow_sqc_eu
189192
name: "SQC-EU Shadow Analysis"
190193
env:
@@ -193,6 +196,8 @@ analysis_SQC_EU_shadow_task:
193196

194197
analysis_SQC_US_shadow_task:
195198
<<: *ANALYSIS_BASE_LINUX_TEMPLATE
199+
# only executed in CRON job AND on master branch
200+
only_if: $CIRRUS_CRON == $CRON_NIGHTLY_JOB_NAME && $CIRRUS_BRANCH == "master"
196201
alias: sonar_analysis_shadow_sqc_us
197202
name: "SQC-US Shadow Analysis"
198203
env:
@@ -298,8 +303,6 @@ promote_task:
298303
depends_on:
299304
- formatting
300305
- sonar_analysis_next
301-
- sonar_analysis_shadow_sqc_eu
302-
- sonar_analysis_shadow_sqc_us
303306
- qa
304307
- qa_windows
305308
- build

0 commit comments

Comments
 (0)