如何运行jenkins项目在多个从服务器上运行?(How to run a jenkins project to run on multiple slaves?)

编程入门 行业动态 更新时间:2024-10-27 10:18:16
如何运行jenkins项目在多个从服务器上运行?(How to run a jenkins project to run on multiple slaves?)

我已经在我的机器(主)中配置了Jenkins。 在主机中,我创建了Jenkins项目。 后来我添加了两个奴隶并将标签命名为“windows”。 从站连接到主站。 此外,我将此标签设置为Jenkins项目,选项为“限制此项目可以运行的位置”。

现在我触发Jenkins构建了两次并检查。 此构建仅在一个从站中运行,第二次触发构建处于挂起状态以在同一从站中运行。

我删除了我在Jenkins项目中设置的标签,以便在任何免费的奴隶中运行。 那也没有用。 如果我触发了相同的Jenkins项目2次,一个正在运行,另一个正在运行。

我搜索了这个,我得到的解决方案并不成功。 有谁可以请你告诉我如何解决这个问题?

I have configured Jenkins in my machine (master). In master machine, i have created Jenkins project. Later i have added two slaves and named the label as "windows" for both. Slaves connected to the master. Also, i set this label to the Jenkins project to the option "Restrict where this project can be run".

Now i triggered the Jenkins build for two times and check. This build is run in only one slave and the second time triggered build is in pending to run in the same slave.

I have removed the label which i set in Jenkins project to run in any slaves which is free. That too not worked. If i triggered the same Jenkins project 2 times, one build running and another one not running.

I have searched about this and the solution i got is not a successful one. Could anyone please clear me about this how to resolve this issue?

最满意答案

那么,你所做的似乎是正确的做法。 您是否允许构建同时运行? 否则那就是问题......

另一个问题是,Jenkins将始终选择最后一个成功的奴隶,如果可能的话。 我不认为这是你的问题,但可能很高兴知道。 因此,如果您连续14次启动并且不允许并发运行,则它们将全部运行在同一个从站上。

Well, what you did seems to be the correct way of doing it. Do you allow the build to be run concurrently? Otherwise that is the problem...

Another issue, Jenkins will always choose the last successful slave for a build if it is possible. I don't think this is your issue but might be good to know. So if you start in 14 times in a row and you don't allow concurrent run, they will all run on the same slave.

更多推荐

本文发布于:2023-07-26 02:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1269556.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   器上   项目   jenkins   slaves

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!