禁用詹金斯从工作中构建奴隶

发布于 2024-12-16 20:42:52 字数 174 浏览 2 评论 0原文

我想要一个定期工作来重建詹金斯构建奴隶,但如果工作当前正在运行,我不希望它被触发。我的想法是要么

  • 消耗从属设备上所有可能的构建插槽,要么
  • 从工作中禁用从属设备并等待它空闲,

我不知道如何从工作中执行任何操作。是否可以?也许另一种方法?

谢谢!

I would like a periodic job that rebuilds jenkins build slaves, but I don't want it to fire if jobs are currently running. My thoughts are either to

  • consume all possible build slots on a slave, or
  • disable the slave from the job and wait for it to go idle

I don't know how to do either from a job. Is it possible? Maybe another approach?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原谅过去的我 2024-12-23 20:42:52

我认为解决这个问题的方法是使用“通过脚本启动从属”选项。从站具有定期关闭从站的选项,然后我可以使用脚本来清理它、重建它并重新启动从站。

离线过程有保障措施,以确保在执行构建时不会发生这种情况。

I think the way I'm going to solve this is to use the "launch slave via script" option. The slave has options for periodically turning the slave off, and then I can just use the script to clean it up, rebuild it, and relaunch the slave.

The offline process has safeguards to make sure it won't happen when a build is executing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文