Created
October 1, 2017 13:48
-
-
Save tizki/60a846127386a6e5d27c9713668e07f5 to your computer and use it in GitHub Desktop.
Kills a zombie build thread by finishing the executor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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