Skip to content

Instantly share code, notes, and snippets.

@tizki
Created October 6, 2016 20:32
Show Gist options
  • Save tizki/2a66367c06d15e6e88ff1ca93a0ca3e6 to your computer and use it in GitHub Desktop.
Save tizki/2a66367c06d15e6e88ff1ca93a0ca3e6 to your computer and use it in GitHub Desktop.
def jenkins = Jenkins.getInstance()
def jobList = ["job1", "job2", "job3"]
//time frame is for example, you should choose a start build and an end build and take their timestamps
long startFrameTime = 1475758795672L
long endFrameTime = 1475779098244L
jobList.each{ jobName ->
def job = jenkins.getItem(jobName)
def bld = job.getBuilds().byTimestamp(startFrameTime,endFrameTime)
println "***** Job: ${job.name} ******"
bld.each{ b->
println "Build: ${b.number}, Slave: ${b.getBuiltOn()}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment