Abort Jenkins pipeline (workflow) build after timeout -


whenever build gets stuck of fails somewhere timeout kicks in build not aborted , stuck running forever until cancel build, go console , press link click here forcibly terminate running steps

here sample code i'm trying not working:

stage concurrency: 1, name: 'build' def buildsteps = [:]     buildsteps['server'] = {         timeout(1) {             node('build') {                 timestamps {                      bat "waitfor nothing /t 120 >nul"             }         }     }    }  parallel buildsteps 

this log

[pipeline] stage (build) entering stage build proceeding [pipeline] parallel [pipeline] [server] { (branch: server) [pipeline] [server] timeout [pipeline] [server] { [pipeline] [server] node [server] running on ci106 in c:\jws\workspace\jftimeout [pipeline] [server] { [pipeline] [server] timestamps [pipeline] [server] { [pipeline] [server] bat 14:42:52 [server] [jftimeout] running batch script 14:42:53 [server]  14:42:53 [server] c:\jws\workspace\jftimeout>waitfor nothing /t 120  1>nul  14:43:52 [server] sending interrupt signal process aborted user 14:49:29 [server] sending interrupt signal process click here forcibly terminate running steps terminating bat [pipeline] } [pipeline] // timestamps [pipeline] } [pipeline] // node [pipeline] } [pipeline] // timeout [pipeline] } failed in branch server [pipeline] // parallel [pipeline] end of pipeline 

at 14:43:52 timeout sends stop signal nothing happens.

at aborted user when manually canceled build

install build timeout plugin https://wiki.jenkins-ci.org/display/jenkins/build-timeout+plugin go manage jenkins > configure system > build-timeout plugin > buildstep action > check enable buildstep action

after enabled plugin build stopped when timeout has reached.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -