jjb: lttng-modules: Don't abort concurrent gerrit jobs
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 11 May 2020 17:33:34 +0000 (13:33 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 11 May 2020 17:33:34 +0000 (13:33 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
scripts/lttng-modules/master.groovy

index a5b19aca1de9bbee832eca932455e44a3d8dfcf5..3e2ec7750b298ddfe41f1cd209c53553ef075307 100644 (file)
@@ -504,10 +504,13 @@ while ( kversions.size() != 0 || ongoingBuild.size() != 0 ) {
     }
 
     // Abort job if a newer instance is queued
-    similarJobQueued = Hudson.instance.queue.items.count{it.task.getFullDisplayName() == currentJobName}
-    if ( similarJobQueued > 0 ) {
+    if (!currentJobName.contains("gerrit")) {
+      similarJobQueued = Hudson.instance.queue.items.count{it.task.getFullDisplayName() == currentJobName}
+      if (similarJobQueued > 0) {
+        println "Abort, a newer instance of the job was queued"
         build.setResult(hudson.model.Result.ABORTED)
         throw new InterruptedException()
+      }
     }
 
     def i = ongoingBuild.iterator()
This page took 0.094023 seconds and 4 git commands to generate.