Jenkins不允许同一作业在同一节点上并发运行吗? [英] Jenkins to not allow the same job to run concurrently on the same node?

查看:672
本文介绍了Jenkins不允许同一作业在同一节点上并发运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个节点和2个工作.任何节点都可以同时运行2个作业,并且任何作业都可以同时执行.我希望能够限制在同一台计算机上同时运行同一作业.例如:

I have 4 nodes and 2 jobs. Any node can run 2 jobs concurrently and any job can be executed concurrently. I want to be able to restrict running the same job concurrently on the same machine. For example:

工作:J1和J2 节点:N1,N2,N3和N4

Jobs: J1 and J2 nodes: N1,N2,N3 and N4

我可以同时在同一节点上运行J1和J2. 我可以同时在N1和N3上运行J1. 但是我不想在同一节点上同时运行J1和J1的另一个版本.

I can run J1 and J2 on the same node at the same time. I can run J1 on N1 and N3 at the same time. BUT I do not want to run J1 and another build of J1 on the same node at the same time.

我尝试了锁和闩锁","Jenkins独家执行",排除插件"插件,这些插件在尝试协调不同工作时会很好地工作.但是我的情况是试图管理同一工作的不同构建实例.

I have tried "Locks and Latches", "Jenkins Exclusive Execution", "Exclusion Plugin" plugins, and these will work well when trying to coordinate different jobs. But my case is trying to manage different build-instances of the same job.

推荐答案

尝试

Try Throttle Concurrent Builds Plugin. It allows to throtte the number of concurrent builds of a project running per node or globally. In your case you should set:

  • 最大并行构建总数:0(=无限)
  • 每个节点的最大并行构建数:1

这篇关于Jenkins不允许同一作业在同一节点上并发运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆