0
votes

I am using build blocker along with MultiJob plugin in my jenkins job to orchestrate a pipeline.

Here is a very small part of what I want to achieve.

Dependency within jobs JobA --> Job B -(Join Plugin) --> Job C and Job D --> JobE (Join Plugin End)

Another job Job A1 (the build blocker plugin contains the list of job B to job E)

Now I have created 2 phases in multijob phase, Suite 1 and Suite 2, in suite 1 I am running JOb A only(which will then call job B and so on) and in Suite 2 I am calling job A1

The issue:

After jobA completes the multijob plugin thinks the phase is complete so it put A1 job in the queue, but since Job B is also running at that moment so A1 remains in the queue(due to buildblocker). So queue at that time contains job B and job A1, but as soon as job B completes and before it is able to put the job C and job D in the queue, job A1 starts executing.

Is there any solution for this issue? The example above is very small part of what I want to achieve and I know there are ways to achieve that in simple manner, but I need to orchestrate a much bigger pipeline where several jobs are dependent on each other in complex way, so need a solution for the above issue.

Thanks, Manish Joshi

1

1 Answers

0
votes

I was able to achieve this result by using a combination of Build Flow and MultiJob plugin.

I have created a build flow job and named it Suite1, which contains build("jobA1") build("jobB1") parallel( {build("jobC1")}, {build("jobD1")} ) build("jobE1") and in another job Suite2 I was running job A2, and then ran Suite1 and Suite2 in phases in multijob plugin

Hence now job A2 was waiting till the jobE1 finishes which I wanted to acheive.

Thanks, Manish