如何防止两个相同类型的管道詹金斯作业在同一节点上并行运行? [英] How do I prevent two pipeline jenkins jobs of the same type to run in parallel on the same node?
本文介绍了如何防止两个相同类型的管道詹金斯作业在同一节点上并行运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不想让两个相同类型(相同存储库)的作业不能在同一节点上并行运行.
I want not to allow two jobs of the same type (same repository) not to run in parallel on the same node.
如何在Jenkinsfile中使用groovy做到这一点?
How can I do this using groovy inside Jenkinsfile?
推荐答案
您获得了disableConcurrentBuilds属性:
You got at the disableConcurrentBuilds property:
properties properties: [
...
disableConcurrentBuilds(),
...
]
然后工作将等待年长的人先完成
Then the job would wait the older one to finish first
这篇关于如何防止两个相同类型的管道詹金斯作业在同一节点上并行运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文