Created
September 27, 2018 09:09
-
-
Save wrossmck/b0b047b7203e2ba257a366d41d257b33 to your computer and use it in GitHub Desktop.
Deletes offline jenkins agents from /script console (or CJOC)
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
Jenkins.instance.nodes.each { | |
if (it.computer.isOffline()){ | |
println(it.name) | |
it.computer.doDoDelete() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment