0

I have created Job A which looks for upstream jobs (Job B and Job C) success result and triggers a shell script to verify a condition.

Once Job B and Job C executed successfully Job A executes downstream jobs (Job D and Job E).

I have used reverse (to configure upstream jobs) and downstream-ext (to configure downstream jobs) plugins in Job A using JJB.

Issue I am facing here is: After Job B is executed successfully without waiting for Job C result. Job A should wait for both Job B and Job C and then execute based on the result.

Could you please help me how to configure this scenario.

rameshthoomu
  • 1,234
  • 2
  • 17
  • 33

2 Answers2

0

You can try using the Join Plugin, here is the documentation:
https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin

daniel
  • 174
  • 2
  • 10
0

This'd be easier if you convert your A job to a build flow https://wiki.jenkins.io/display/JENKINS/Build+Flow+Plugin?focusedCommentId=60917290 or even better it's successor Pipeline 2.0 https://jenkins.io/doc/book/pipeline/

(Groovy) Code in A would then be something like:

if (build('scenario-B-Job') && build('scenario-C-Job')) {
    build('scenario-E-Job')
    build('scenario-D-Job')

} You can also parallelize (B,C and then D,E) to shorten overall execution times if you have enough slaves around.