How can I block a Jenkins 2.x Pipeline job while dependent jobs are building

依然范特西╮ 提交于 2019-11-30 04:31:17

问题


My question is fairly straightforward: With a Freestyle Jenkins project under "Advance Project Options" I can select two configuration options that help prevent conflicts between different projects (that may arise e.g. when one project updates a set of header files while another project is including these):

  • Block build when upstream project is building
  • Block build when downstream project is building

For a Pipeline or Multibranch project these configuration options are unavailable, and I am (so far without success) looking for a way to achieve the same effect for a Pipeline or Multibranch project.


回答1:


You may solve this with the Lockable Resource Plugin.

By creating a shared resource used by upstream, and downstream, projects. Let the pipeline wait for it to be available.



来源:https://stackoverflow.com/questions/38845882/how-can-i-block-a-jenkins-2-x-pipeline-job-while-dependent-jobs-are-building

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