In Jenkins, is there a way to give different timeouts to each or selected build step?
Build-time plugin out gives functionality of timeout "Abort the build if it's stuck" on complete project, what I need is to give different timeouts for each step. This way I can make my process more efficient.
相关问题
- (ASP.NET) Project file must include 'WindowsBa
- Jenkins - cmd is not recognized
- When using Nokogiri, how do you suppress the inser
- Where Jenkins stores plugin configuration
- Multi-branch configuration with externally-defined
相关文章
- dotnet restore还原nuget包时无法加载 https://api.nuget.org/
- jenkins在window集群环境中如何部署自动化发布?
- jenkins + Publish over FTP 自动部署前端React项目
- jenkins自定打包部署React前端项目遇到的问题。
- Best way to manage docker containers with supervis
- Access BitBucket payload data in Jenkins pipeline
- Jenkins Not Outputting Junit Report Info From File
- Intermittent “SVNException: svn: E175002: Connecti
This question was originally asked before the Jenkins Pipeline existed. Although you can continue to use and configure Jenkins through the GUI, it's currently recommended to transition your projects to the pipeline. Using the Pipeline allows you to track changes to your pipeline, and store it as code so it's easy to recreate your build on any machine if you need to move your Jenkins server.
Using the pipeline, adding a timeout to a very specific part of your build is trivial. The pipeline syntax is simple and easy to use.
Related question: How to add a timeout step to Jenkins Pipeline
Example shamelessly taken from: CloudBees Top 10 Best Practices for Jenkins Pipeline Plugin
There is no such functionality that I am aware of. JENKINS-8900 requests it.
If you are using Jenkins pipeline, and the newer declarative style (has a top level
pipeline {
element) then there is atimeout
option
that can be used for the overall job, or on individual stages:Docs: https://jenkins.io/doc/book/pipeline/syntax/#options
The easiest way (and that is the way I am doing that) is to actually have different project dependent on each other and to build them in a row. It's not perfect, but the other option would be to monitor execution of different plugins with different tools/build behaviour.
Still, the approach will work, although it does suck...
BTW, there is a nice plugin which can help you out using a set of project - Build Pipeline plugin. I am using it right now to both visualize and verify the pipeline I have created. It is really handy...