I have a couple of jobs also that screw up the slave so badly it has to be 
taken offline and fixed before it can be used again. I do it using the Groovy 
plugin and this system groovy script which runs in a build step:

import hudson.model.*
def thr = Thread.currentThread()
def build = thr?.executable
build.getBuiltOn().toComputer().setTemporarilyOffline(true)

The upside is it requires no authentication and does not require the slave to 
be able to connect to master. These slaves happen to run in an isolated network 
that blocks connections to the network where the master sits.

-- Sami

William Soula <william.so...@drillinginfo.com> kirjoitti 1.3.2013 kello 21.56:

> Create a downstream job that kills the slave by running the following command:
> curl -d 
> "offlineMessage=&json=%7B%22offlineMessage%22%3A+%22%22%7D&Submit=Yes" 
> http://[user]:[userApi]@[jenkinsServer]/computer/[slaveName]/doDisconnect
> 
> you can leave off [user]:[userApi] if authentication is not necessary.  
> Probably need to change the setting for keeping the slave online.
> 
> Will
> 
> ________________________________________
> From: jenkinsci-users@googlegroups.com [jenkinsci-users@googlegroups.com] on 
> behalf of Pawel [pgronkiew...@gmail.com]
> Sent: Monday, February 25, 2013 2:29 AM
> To: jenkinsci-users@googlegroups.com
> Subject: Re: Jobs starting on slaves with no disk space
> 
> That's not a solution I can accept - I need those workspaces at least for
> some time. They are being wiped out every 24h.
> For me it looks like a bug in Jenkins - as problems like that shouldn't
> happen.
> 
> 
> 
> --
> View this message in context: 
> http://jenkins.361315.n4.nabble.com/Jobs-starting-on-slaves-with-no-disk-space-tp4656054p4656972.html
> Sent from the Jenkins users mailing list archive at Nabble.com.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to