2 * Completely slays misbehaving slave nodes
4 * NOTE: Use del_computer.groovy first! If nodes are still hanging around
5 * _then_ consider using this script. This one is mucking around in a
6 * location we should not normally be touching, however if a slave
7 * refuses to go away (tosses an exception) this _will_ get rid of it.
9 * NOTE 2: If you have any slaves you want to live through this and you
10 * have them currently marked offline you _must_ bring them back online.
14 import jenkins.model.*
18 for (aComputer in Jenkins.instance.computers) {
20 println "displayName: " + aComputer.properties.displayName
21 println "offline: " + aComputer.properties.offline
22 println "temporarilyOffline: " + aComputer.properties.temporarilyOffline
23 if (aComputer.properties.offline) {
24 println "Bad node, removing"
25 Jenkins.instance.removeComputer(aComputer)
29 catch (NullPointerException nullPointer) {
30 println "NullPointerException caught"
35 // vim: sw=4 sts=4 ts=4 et ai :