From: Michael Jeanson Date: Mon, 11 May 2020 17:33:34 +0000 (-0400) Subject: jjb: lttng-modules: Don't abort concurrent gerrit jobs X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b7efa3aa81e1e299fa75b977dee3672bfef44f5c;p=lttng-ci.git jjb: lttng-modules: Don't abort concurrent gerrit jobs Signed-off-by: Michael Jeanson --- diff --git a/scripts/lttng-modules/master.groovy b/scripts/lttng-modules/master.groovy index a5b19ac..3e2ec77 100644 --- a/scripts/lttng-modules/master.groovy +++ b/scripts/lttng-modules/master.groovy @@ -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()