Build-timeout Plugin in Jenkins: how long is 'too long'?

萝らか妹 提交于 2019-12-22 08:31:33

问题


I would like to take advantage of this plug-in but the 'Abort the build if it's stuck' option doesn't set any timer and the description of the plug-in doesn't say how long is the timer, it just says: 'This plugin allows you to automatically abort a build if it's taking too long'

My question is how long is that? 1 hour, less/more?
Can I set up my own time? Is that timer for the overall job or every line in the batch file has that timer?


回答1:


Build-timeout plugin has multiple options (taken from help documentation of Build Timeout Plugin)

  • Absolute time. Use this if you know exactly how much time your build should not exceed in advance
  • Elastic time. Use this option if you want Jenkins to decide on the time. It basically averages out on the last n builds and will stop a build if it exceeds given percentage. If you do not know in advance how much time your build takes, use this option
  • Likely Stuck. Use Jenkins' Executor.html#isLikelyStuck() heuristics based approach to detect build is suspiciously taking for a long time

In your case, option two seems to be best initially.




回答2:


I upgraded my jenkins installations recently to 1532 and noticed on jobs that the radio to set time has gone missing. I may file this as a bug.

This is what it should look like on your jobs:

https://github.com/jenkinsci/build-timeout-plugin/pull/14#issuecomment-24114825




回答3:


I just upgraded to Jenkins 1535 and with that a new upgrade of the plug-in was available. That upgrade fixed the problem I was having. The timeout time is now available.



来源:https://stackoverflow.com/questions/19321336/build-timeout-plugin-in-jenkins-how-long-is-too-long

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!