Jenkins/Hudson - 如何并行运行多个作业超过 1 级深度? [英] Jenkins/Hudson - How to run multiple jobs in parallel more than 1 level deep?

查看:11
本文介绍了Jenkins/Hudson - 如何并行运行多个作业超过 1 级深度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I'm trying to get the following workflow running in Jenkins, in parallel. So for example, both A and B running at the same time. As soon as A finishes run A2 and A3 at the same time, etc...

It seems like a pretty common use case but most plugins I tried do no support more than 1 level deep, which is the case with the A branch below. Join plug-in doesn't seem helpful here.

I read about using the Promotion plugin but I'm a little mystified on what to fingerprint/artifacts to archive to make this work.

Any clue on how to make this simple build pipeline work?

解决方案

There is a solution which works great: the Multi-Job plugin. It does exactly what you want. With The MultiJob Plugin you can split your job into phases which run serially. Within each phase, the jobs run in parallel.

For simplicity I'm going to assume that A and B are "compilation jobs" you wish to run in parallel. Further assume there may be an A-Test (and its children) and B-Test which are also separate jobs.

You create the multijob as follows: New Item -> Multijob Project

In the project you create two phases (Add build step "MultiJob Phase"). The first will be COMPILE and you would add Phase Job's "A" and "B".

You can change the options for the COMPILE phase jobs so that if either fails, the whole phase aborts (the default), or allow the job to continue.

Next you add another MultiJob Phase Build step for TEST and add "A-Test" and "B-Test" to that. Remember that A, B, A-Test, and B-Test are all separate jobs that can also be run individually if desired.

That's it. When the job runs it will contain links to the child jobs so you can see what happened with the sub-jobs.

这篇关于Jenkins/Hudson - 如何并行运行多个作业超过 1 级深度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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