The case is as follow , I don't control when the job I am running will cause a disconnection between slave and jenkins server - it could happen at any time. anyway I will try your suggestion below and see if it will work for me. Thanks for your reply and best regards
On Monday, March 10, 2014 2:31:40 AM UTC+2, Christian Willman wrote: > > Hi EK, > > What's the purpose of this exercise? It's very strange indeed. > > I guess you could add two System Groovy scripts to the particular job. The > first script is the first builder in the job's builders list, and it grabs > a reference to the slave via > jenkins.model.Jenkins.getInstance()#getComputer(...) and mark it as offline > with setTemporarilyOffline(...). The next builder will perform whatever > tasks you want, and a final System Groovy script will mark the slave as > online. > > If you can more thoroughly describe your goals then we can likely suggest > a better means. > > Cheers, > Christian > > On Saturday, March 8, 2014 7:08:07 AM UTC-5, EK wrote: >> >> Hi ... >> >> I need to run a job which might cause slave to disconnect from Jenkins >> server for a while- currently if slave is disconnected job is immediately >> marked as failed or aborted, is there a way to do this, I was thinking >> about something like the follow: >> 1. send job to slave >> 2. go offline >> 3. run job >> 4. go online >> 5. report results ... >> >> Best Regards >> EK >> > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
