Skip to content

Instantly share code, notes, and snippets.

@tizki
Created October 1, 2017 13:48
Show Gist options
  • Save tizki/60a846127386a6e5d27c9713668e07f5 to your computer and use it in GitHub Desktop.
Save tizki/60a846127386a6e5d27c9713668e07f5 to your computer and use it in GitHub Desktop.
Kills a zombie build thread by finishing the executor
def comp = Jenkins.instance.getComputer(computerName)
//print all executors
comp.getExecutors()..each{
println it
}
//kill with condition (for example executor with number == 1
comp.getExecutors().findAll{ it.number == 1}.each{
it.finish2()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment