Use more oo oriented function for queue fetching
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 16 Jul 2015 15:11:42 +0000 (11:11 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 16 Jul 2015 15:11:42 +0000 (11:11 -0400)
dsl/kernel-lttng-modules.seed.groovy

index b551e16ee3d72bff54c279acfadb517fa8422cd6..86bf76d4e41fe37c78979ea725ad218d0b5e6c61 100644 (file)
@@ -248,6 +248,7 @@ if ( result.exitValue() == 0 ) {
     // Trigger generations
     def dslTriggerKernel = """\
 import hudson.model.*
+import jenkins.model.*
 import hudson.AbortException
 import hudson.console.HyperlinkNote
 import java.util.concurrent.CancellationException
@@ -288,7 +289,7 @@ hudson.model.Hudson.instance.nodes.each { node ->
 println "Nb of live kernel enabled build node "+ kernelEnabledNode
 
 def ongoingBuild = []
-def queueInstance = Jenkins.instance.queue
+def q = jenkins.model.Jenkins.getInstance().getQueue()
 
 
 while (toBuild.size() != 0) {
@@ -296,7 +297,7 @@ while (toBuild.size() != 0) {
                def job = toBuild.pop()
                ongoingBuild.push(job.scheduleBuild2(0))
                println "\\t trigering" + HyperlinkNote.encodeTo('/' + job.url, job.fullDisplayName)
-               println "Debug: currenlty queued task" + queueInstance.items.size()
+               println "Debug: currenlty queued task" + q.getItems().size()
        } else {
                Thread.sleep(random.nextInt(120000))
                ongoingBuild.removeAll{ it.isCancelled() || it.isDone() }
This page took 0.023361 seconds and 4 git commands to generate.