詹金斯根据要求更改标签 [英] jenkins change label as requested

查看:36
本文介绍了詹金斯根据要求更改标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用 jenkins 实现测试基础架构的自动化.要求是让用户能够使用 jenkins 节点进行私有测试或使用私有 jenkins 作业进行调试,然后放回标有标签的节点池中;以便其他标记为在特定标签上运行的作业可以不受干扰地运行.

We use jenkins for automation for our test infrastructure. The requirement is to give users the ability to use a jenkins node for their private test or debug using private jenkins jobs and then put back in the pool of nodes marked with labels; so that other jobs that were marked to run on particular labels can be run without interference.

我们可以通过让用户更改标签来实现这一点,但是这并没有得到锻炼,因为用户(近 50 个)正在制作自己的标签名称,并且管理员需要时间来重新分配节点(即使有进程),并且宝贵的测试时间越来越多做作的.

We can achieve this by letting users alter label, but that didnt workout as users (nearly 50) are making their own label names and it takes time for admin to reassign the nodes (even with process) and precious test time is getting affected.

我们正在寻找一些解决方案,例如能够提供诸如使该节点脱机之类的按钮(无法使用此选项,因为 jenkins 无法再看到该节点,因此用户无法在该节点上运行 jenkins 作业)但可能能够运行脚本.

we are looking for some solution such as ability to provide buttons like take this node offline (cant use this option since jenkins cannot see the node anymore and so users cannot run jenkins job on the node) but may be with the ability to run scripts.

我对此做了一些研究,但不得不在一些要求上妥协,所以我决定向社区寻求帮助......建议?

I have done some research on this but have to compromise on some requirements, so i decided to seek help from the community... SUGGESTIONS?

推荐答案

您是否看过这个问题:

如何使用 CLI 使 Jenkins 主节点离线?

在第一个问题中,有一些 CLI 可以使节点离线.

In the 1st question, there are some CLI to make a node offline.

也许您可以使用一个参数(节点名称)在 master 上创建一个专用作业.此作业将调用 Jenkins CLI 来停止您的节点.

Maybe you can create a dedicated job on the master with one parameter (the node name). This job will call the Jenkins CLI to stop your node.

这篇关于詹金斯根据要求更改标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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