Created
May 6, 2020 21:19
-
-
Save gwsu2008/6dd51a33798d52b241227a00b7f19c5c to your computer and use it in GitHub Desktop.
remove-offline-nodes.groovy
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
for (aSlave in hudson.model.Hudson.instance.slaves) { | |
if (aSlave.getComputer().isOffline()) { | |
aSlave.getComputer().setTemporarilyOffline(true,null); | |
aSlave.getComputer().doDoDelete(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment