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
If you don't want to use the Jenkins plugin and want to timeout a script or any command then you can use the Linux inbuilt utility "timeout".
The above command will run
test
executable for 1 minute and if it continues to execute after the timeout then the command will timeout and kill the process byKILL
utility.Please install Build Timeout plugin for your Jenkins.
Jenkins> Manage Jenkins> Manage Plugins
search for Build Timeout in available tab.. Install it. You would be finding it in Build environment as "Abort the build if it's stuck". Set the Timeout strategy and time. Absolute Deadline Elastic Likely Stuck No Activity
in my case i have used No Activity.
Hope it Helps.
I think the
timeout
command from GNU coreutils might be what you want. This is under the assumption that your build steps are scripts.Build-timeout Plugin isn't applicable to pipelines. refer to wiki
For pipeline time out, try something like:
Similar answer from another thread: How to add a timeout step to Jenkins Pipeline
As of current versions of Jenkins, this can be done. Hit 'Configure', then select the 'Build Environment' tab, and then set your timeout.
Here's an screenshot:
In pipeline jobs you can wrap your step(s) with
timeout
as follows:timeout(time: 5, unit: 'MINUTES') { // steps to execute }