def kgitrepo = build.buildVariableResolver.resolve('kgitrepo')
def kverfloor = new kVersion(build.buildVariableResolver.resolve('kverfloor'))
def job = Hudson.instance.getJob(build.buildVariableResolver.resolve('kbuildjob'))
+def currentJobName = build.project.getFullDisplayName()
// Get the out variable
def config = new HashMap()
}
}
+ // Check for queued similar job since we only want to run latest
+ // as Mathieu Desnoyers requirement
+ similarJobQueued = Hudson.instance.queue.items.count{it.task.getFullDisplayName() == currentJobName}
+ if ( similarJobQueued > 0 ) {
+ // Abort since new build is queued
+ build.setResult(hudson.model.Result.ABORTED)
+ throw new InterruptedException()
+ }
+
def i = ongoingBuild.iterator()
while ( i.hasNext() ) {
currentBuild = i.next()
def kgitrepo = build.buildVariableResolver.resolve('kgitrepo')
def uversion = build.buildVariableResolver.resolve('uversion')
def job = Hudson.instance.getJob(build.buildVariableResolver.resolve('kbuildjob'))
+def currentJobName = build.project.getFullDisplayName()
// Get the out variable
def config = new HashMap()
}
}
+ // Check for queued similar job since we only want to run latest
+ // as Mathieu Desnoyers requirement
+ similarJobQueued = Hudson.instance.queue.items.count{it.task.getFullDisplayName() == currentJobName}
+ if ( similarJobQueued > 0 ) {
+ // Abort since new build is queued
+ build.setResult(hudson.model.Result.ABORTED)
+ throw new InterruptedException()
+ }
+
def i = ongoingBuild.iterator()
while ( i.hasNext() ) {
currentBuild = i.next()
}
// Check for queued similar job since we only want to run latest
- // As Mathieu Desnoyers requirement
+ // as Mathieu Desnoyers requirement
similarJobQueued = Hudson.instance.queue.items.count{it.task.getFullDisplayName() == currentJobName}
if ( similarJobQueued > 0 ) {
// Abort since new build is queued