Jenkins Build Queue Limit

萝らか妹 提交于 2020-08-05 07:54:34

问题


I've noticed that there seems to be a build queue limit of one in Jenkins. When I trigger a lot of builds it seems to only place a max of one build in the build queue. Is there a way to remove this limit so there can be more then one build in the build queue?


回答1:


This is intended behaviour:

  • Normally, your jobs will depend on some input (from SCM, or from some upstream jobs)
  • If your slave capacity is too low to catch up with each and every build, then you'd normally want to test/build/... only the very latest "item".

This is the default behaviour. Without that, there'd be a risk that the build queue grows indefinitely.

On top of that, Jenkins does not track the properties of normal build requests -- they all look the same, and Jenkins can not (for example) separate different SCM states that existed at different triggering times.

This is however exactly the point that gives you a workaround: parameterize your jobs, and then use for example the Trigger parameterized build on other projects post-build action to trigger those. Then Jenkins will queue each build request individually -- and inside your job, you can use the parameter to find out what exactly has to be done.

I think that Jenkins will not even squash queued parameterized builds that have identical parameter values, so even some dummy parameter that has the same value all the time should do (but better test this first).



来源:https://stackoverflow.com/questions/39499422/jenkins-build-queue-limit

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