Jenkins Parallel Trigger and Wait

raksja picture raksja · Oct 17, 2012 · Viewed 9k times · Source

I have 4 jobs which needs to be executed in the following sequence

JOB A 
 |------> JOB B
 |------> JOB C 
            |------> JOB D

In the above

  1. A should trigger B & C parallely and C inturn triggers D.
  2. A should hold the job as running till all 3 of them completed.

I tried the following plugins and couldn't achieve what I am looking for

  • Join Plugin
  • Multijob Plugin
  • Multi-Configuration Project
  • Paramterized Trigger Plugin

Is there any plugin which I haven't tried would help me in resolving this. Or is this can be achieved in a different way. Please advise.

Answer

Mahi picture Mahi · Jun 25, 2015

Use DSL Script with Build Flow plugin.

try this Example for your execution:

   build("job A")

   parallel
   (
      {build("job B")}
      {build("job C")}
   )

   build("job D")