You can implement timeout following this guide - this one is for user input but you can adapt it accordingly with a try/catch block. https://support.cloudbees.com/hc/en-us/articles/226554067-Pipeline-How-to-add-an-input-step-with-timeout-that-continues-if-timeout-is-reached-using-a-default-value
On Thursday, 1 December 2016 13:39:33 UTC, Jonathan Hodgson wrote: > > Hi, > > Right now I'm looking at a pipelne job which has been hung on two slaves > for over two hours. > > Both slaves (one windows, one OSX) show as being connected, and the slave > is still running on both, but both are stalled... one on starting a batch > script, the other either in the shell script or just after it. > > The Job has run without issue before. > > This raises a couple of questions > > 1) What might be causing this (I've had mystery hangs before). > 2) How can I investigate it > > and > > 3) Is there a way I can implement some sort of time out? If there has been > no activity from the slave for a given period of time I'd prefer it if the > build ended and I received an email telling me there had been a problem. As > it is, I'm unaware of the problem unless I check, (which sort of negates > the point of an autobuild), and the build system is effectively usefless > until I go there and stop the build. > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5cd4d517-f63c-47e9-9c47-7829049607c2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
