Jenkins节点是否可以优先进行构建作业 [英] Can Jenkins nodes be given priority for build jobs

查看:67
本文介绍了Jenkins节点是否可以优先进行构建作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在jenkins中有一组构建作业,它们可以在3个构建节点中的任何一个中运行.它们都带有通用标签"ubuntu_build".每个节点都有许多执行程序,因此允许某些构建在计算机上并行执行.该安装程序运行正常,可以完成预期的工作,但我想对其进行改进.

I have a set of build jobs in jenkins that can run in any one of 3 build nodes. They are all labeled with a common label of "ubuntu_build". Each of the nodes has a number of executors thus allowing some of the builds to execute in parallel on a machine. The setup is running fine and does what it is supposed to but I would like to improve it.

这3个构建节点具有不同的性能.第一个速度是第二个速度的两倍,第二个速度是第三个速度的两倍. (称它们为fast_node,regular_node,slow_node)

The 3 build nodes have varying performance. The first is twice as fast as the second which is twice as fast as the third. (call them fast_node, regular_node, slow_node)

据我了解计划策略,下一次将优先使用最后一次用于给定构建作业的计算机.当没有太多的构建需要进行并且作业最后一次构建在slow_node上时,有时这可能会导致问题,因此即使fast_node有一些可以执行的执行程序,它也可以继续执行.

As I understand the scheduling strategy, the machine that was used last for a given build job will be preferred the next time around. This can sometimes lead to issues when there are not many builds going through and the jobs were last built on slow_node and thus it keeps going there even though fast_node has some executors that could work.

我想说的一种方式是,对于通过队列的任何作业,我希望它尝试在fast_node上找到空间,然后在regular_node上找到空间,最后在slow_node上找到空间. (即尝试继续使用可用的最快执行器)​​

What I would like is a way to say that for any job coming through the queue I would like it to try to find room on fast_node, then regular_node, then finally slow_node. (ie. try to keep using the fastest executor that is available)

反正有设置这样的东西吗?

Is there anyway to set something like this up?

推荐答案

基于AltF4_答案,我再次查看了插件并发现了

Based upon AltF4_ answer I looked again at the plugins and found The Scored Load Balancer Plugin. It looks like it could do even better than the Least Load Plugin. I am going to give it a try and see how it works out.

这篇关于Jenkins节点是否可以优先进行构建作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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