Add bool to force only failed job to run
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 23 May 2019 17:35:20 +0000 (13:35 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 23 May 2019 17:35:20 +0000 (13:35 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
jobs/system-tests.yaml
scripts/system-tests/system-trigger.groovy

index 13f9919f3c04416aca5f882bed6fc3f10d64fb1a..92def44688e50ba361cf4e1d5397351efa2c6b95 100644 (file)
           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:
index 154ba0576997b53a2be48d545a212efa7d9b0ce2..8267c557e26b1132c3e480da7aa32cb6236145ef 100644 (file)
@@ -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.
This page took 0.024257 seconds and 4 git commands to generate.