如果下游 hudson 作业正在运行,则停止构建上游 hudson 作业
我按以下方式设置 hudson 作业:
作业 A 触发作业 B、C、D
作业 A 每 6 小时推送一个新版本,然后触发作业 B、C、D,后者将在该版本上运行测试脚本。
但有时,工作B、C、D需要更多时间,有时超过6小时。在作业 A 推送新构建的情况下,测试结果将因 2 个构建而混乱。
所以,我想知道Hudson是否有一种方法来检查下游作业是否正在运行,是的,然后阻止上游作业直到下游作业完成。
I have setup hudson jobs in the following way:
Job A triggers Job B, C, D
Job A is pushing a new build every 6 hrs and then trigger Job B, C, D which will run test scripts on that build.
But sometimes, Job B, C, D takes more time, sometimes more than 6hrs. In this case of Job A pushes a new build, the tests results will be messed up with 2 builds.
So, I wanted to know if there is a way in Hudson to check if the downstream jobs are running, it Yes, then block the upstream job till the downstream jobs complete.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的作业 A 可能配置为触发“构建后操作”中的作业 B、C、D。这意味着作业B、C、D将在作业A完成后开始。
您可以尝试触发 B、C 和 D 作为附加构建步骤(使用“在其他项目上触发/调用构建”构建步骤)。然后,您可以选择等待下游作业完成(只需选中“阻止直到触发的项目完成其构建”)。
如果您想同时触发所有 B、C 和 D,只需在同一行中指定所有这些(“在其他项目上触发/调用构建”步骤的“要构建的项目”参数)。否则,您可以为每个作业添加多个此类构建步骤
Your job A is probably configured to trigger the jobs B,C,D in the 'Post-build Actions'. It means that jobs B,C,D will be started after the job A completion.
You may try to trigger the B,C and D as an additional build step ( using 'Trigger/call builds on other projects' build step). You'll then have an option to wait till the downstream job is completed (just check the 'Block until the triggered projects finish their builds').
If you'd like to trigger all the B,C and D simultaneously just specify all of them in the same line ( the 'Projects to build' parameter of the 'Trigger/call builds on other projects' step). Otherwise you may add multiple such build steps for each job