Last active
August 10, 2018 07:30
-
-
Save p0deje/880880422df00f4d9031e8cff3808db8 to your computer and use it in GitHub Desktop.
Restart all dead executros on Jenkins (use from Script Console)
This file contains 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 deadExecutors = Jenkins.instance.computers.collect { c -> | |
c.executors.findAll { !it.isActive() } | |
}.flatten() | |
deadExecutors.each { it.doYank() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this script solved my problem as well