on-internet
← Community

Abort Jenkins pipeline (workflow) build after timeout

Stack Overflow ·

Whenever a build gets stuck of fails somewhere the timeout kicks in but the build is not aborted and it is stuck running forever until you cancel the build, go into console and press the link Click here to forcibly terminate running steps Here is a sample code that I'm trying but 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 is the log [Pipeline] stage (Build) Entering stage Build Proceeding [Pipeline] parallel [Pipeline] [Server] { (Bran

Comments

Sign in or sign up to comment and upvote.

No comments yet.