jenkins - pipeline script - how to check if job execution time exceeds some value? -


i have list of freestyle jobs should built pipeline script. in case job finishes failed status, catch exception. best way limit job execution in time, namely if job execution exceeds time limit, stop execution of job , build next 1 within listofuniquejobstoexecute?

here part of pipeline script:

listofuniquejobstoexecute = ['job1', 'job2', 'job3']         node {             for(job in listofuniquejobstoexecute) {                         try {                             build job: job                         }                         catch (e) {                         slacksend channel: ...                         throw e                     }            } 

we have similar requirement, build several freestyle jobs , implemented timeout.

we did using build timeout plugin, see

https://wiki.jenkins-ci.org/display/jenkins/build-timeout+plugin

you can declare value timeout.enter image description here


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -