From: Jonathan Rajotte Date: Thu, 23 May 2019 17:35:20 +0000 (-0400) Subject: Add bool to force only failed job to run X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=75ecf04538451ce53a44dbda452262c3c41b5590;p=lttng-ci.git Add bool to force only failed job to run Signed-off-by: Jonathan Rajotte --- diff --git a/jobs/system-tests.yaml b/jobs/system-tests.yaml index 13f9919..92def44 100644 --- a/jobs/system-tests.yaml +++ b/jobs/system-tests.yaml @@ -388,6 +388,10 @@ name: 'FORCE_JOB_RUN' default: false description: 'Force the child jobs to run' + - bool: + name: 'FORCE_FAILED_JOB_RUN' + default: false + description: 'Force the failed child jobs to run' properties: - build-discarder: diff --git a/scripts/system-tests/system-trigger.groovy b/scripts/system-tests/system-trigger.groovy index 154ba05..8267c55 100644 --- a/scripts/system-tests/system-trigger.groovy +++ b/scripts/system-tests/system-trigger.groovy @@ -414,7 +414,8 @@ currentJobs.each { jobName, jobInfo -> // if the config has not changed, we keep it. // if it's failed, we don't launch a new job and keep it failed. jobInfo['status'] = pastJob['status']; - if (pastJob['status'] == 'FAILED') { + if (pastJob['status'] == 'FAILED' && + build.getBuildVariables().get('FORCE_FAILED_JOB_RUN') == 'false') { println("${jobName} as not changed since the last failed run. Don't run it again."); // Marked the umbrella job for failure but still run the jobs that since the // last run.