When you are using a free style project you can set that after 20 minutes the build is aborted if not concluded. How is this possible with a Jenkins Multi Branch Pipeline Project?
Jenkins – How to add a timeout step to Jenkins Pipeline
Jenkinsjenkins-pipeline
Related Topic
- Git – How to clone a job in Jenkins
- Jenkins – How to trigger another job from a jenkins pipeline (jenkinsfile) with GitHub Org Plugin
- R – Cocoa Interface Builder’s ‘Attributes Inspector’ like window
- C# – DockPanel ActivateMDIChild in C#
- Jenkins – “Build Periodically” with a Multi-branch Pipeline in Jenkins
- Jenkins how to create pipeline manual step
- Jenkins scripted pipeline or declarative pipeline
- Jenkins: Ignore failure in pipeline build step
Best Answer
You can use the timeout step:
If you need a different
TimeUnit
than MINUTES, you can supply theunit
argument:EDIT Aug 2018: Nowadays with the more common declarative pipelines (easily recognized by the top-level
pipeline
construct), timeouts can also be specified usingoptions
on different levels (per overall pipeline or per stage):Still, if you want to apply a timeout to a single step in a declarative pipeline, it can be used as described above.