Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
}
// Abort job if a newer instance is queued
}
// 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()
build.setResult(hudson.model.Result.ABORTED)
throw new InterruptedException()
}
def i = ongoingBuild.iterator()
}
def i = ongoingBuild.iterator()