禁用詹金斯从工作中构建奴隶
我想要一个定期工作来重建詹金斯构建奴隶,但如果工作当前正在运行,我不希望它被触发。我的想法是要么
- 消耗从属设备上所有可能的构建插槽,要么
- 从工作中禁用从属设备并等待它空闲,
我不知道如何从工作中执行任何操作。是否可以?也许另一种方法?
谢谢!
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为解决这个问题的方法是使用“通过脚本启动从属”选项。从站具有定期关闭从站的选项,然后我可以使用脚本来清理它、重建它并重新启动从站。
离线过程有保障措施,以确保在执行构建时不会发生这种情况。
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.