Jenkins/Hudson - 在所有奴隶上运行脚本
我需要在所有可用的从机上运行脚本。主要是为了让他们在构建之前获得相关的 Windows 修补程序和新的第 3 方工具。
我的脚本可以多次运行,不会产生不良副作用。重量相当轻,所以我很高兴在必要时可以使用蛮力。
任何人都可以就如何确保从属设备在工作之前处于“最新”状态提供建议吗?
我对驱动的解决方案感到满意通过主服务器上的作业,或者可以在正常从属作业处理之前(自动)注入任务的作业。
I have a requirement to run a script on all available slave machines. Primarily this is so they get relevant windows hotfixes and new 3rd party tools before building.
The script I have can be run multiple times without undesirable side effects & is quite light weight, so I'm happy for this to be brute force if necessary.
Can anybody give suggestions as to how to ensure that a slave is 'up-to-date' before it works on a job?
I'm happy with solutions that are driven by a job on the master, or ones which can inject the task (automatically) before normal slave job processing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的商店将其作为从属启动过程的一部分进行。我们将从站配置为通过在主站上执行命令来启动;该命令运行一个 shell 脚本,将最新的工具文件 rsync 到从站,然后启动从站进程。当有工具更新时,我们所需要做的就是重新启动从站或主站。
但是 - 我们使用的是 Linux,而您似乎使用的是 Windows,所以我不确定适合您的等效解决方案是什么。
My shop does this as part of the slave launch process. We have the slaves configured to launch via execution of a command on the master; this command runs a shell script that rsync's the latest tool files to the slave and then launches the slave process. When there is a tool update, all we need to do is to restart the slaves or the master.
However - we use Linux whereas it looks like you are on Windows, so I'm not sure what the equivalent solution would be for you.
对于您的标题:使用 参数插件 或使用矩阵配置并在其中列出您的节点。
对于您关于确保从属设备可靠的问题,我们在其上标记了“测试盒”标签,并在其上尝试了各种工作。我想,您还可以将一个作业部署到所有这些作业上,并让该作业使机器在失败时脱机。
使用 Windows 作为奴隶对我们来说也非常令人讨厌:(
To your title: either use Parameter Plugin or use matrix configuration and list your nodes in it.
To your question about ensuring a slave is reliable, we mark it with a 'testbox' label and try out a variety of jobs on it. You could also have a job that is deployed to all of them and have the job take the machine offline it fails, I imagine.
Using Windows for slaves is very obnoxious for us too :(