How to build a Jenkins project only when two other projects have successfully been built?











up vote
8
down vote

favorite












I've figured out how to trigger another Jenkins project build after a successful build, but how do you solve next situation:



Project A triggers project B and C. Project D should only be build if project B and C have successfully been built. I can't configure B to trigger project D because I'm not sure project C has been built yet, and vice versa.










share|improve this question


























    up vote
    8
    down vote

    favorite












    I've figured out how to trigger another Jenkins project build after a successful build, but how do you solve next situation:



    Project A triggers project B and C. Project D should only be build if project B and C have successfully been built. I can't configure B to trigger project D because I'm not sure project C has been built yet, and vice versa.










    share|improve this question
























      up vote
      8
      down vote

      favorite









      up vote
      8
      down vote

      favorite











      I've figured out how to trigger another Jenkins project build after a successful build, but how do you solve next situation:



      Project A triggers project B and C. Project D should only be build if project B and C have successfully been built. I can't configure B to trigger project D because I'm not sure project C has been built yet, and vice versa.










      share|improve this question













      I've figured out how to trigger another Jenkins project build after a successful build, but how do you solve next situation:



      Project A triggers project B and C. Project D should only be build if project B and C have successfully been built. I can't configure B to trigger project D because I'm not sure project C has been built yet, and vice versa.







      jenkins






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 18 '14 at 12:28









      Lieven Cardoen

      9,52441125212




      9,52441125212
























          3 Answers
          3






          active

          oldest

          votes

















          up vote
          8
          down vote



          accepted










          The "build after other projects are built" suggested by Akhil will not accomplish the stated goal. It will trigger Project D after either Project B or Project C is built. Use the Join Plugin.






          share|improve this answer




























            up vote
            1
            down vote













            There is an option in "Build Triggers" option to "Build after other projects are built". Here is the snapshot for the same:



            enter image description here



            In the Projects to watch, mention: Project B, Project C(Note that multiple projects are mentioned with a comma separated value)






            share|improve this answer

















            • 3




              This will trigger after either B or C is built. OP wanted after both.
              – EricP
              Sep 19 '14 at 14:40










            • Multiple projects can be specified like 'abc, def' per the Jenkins UI tooltip.
              – Vinzz
              Sep 19 '14 at 15:06










            • @EricP is right, It will trigger when either B or C is built.
              – Rachit Agrawal
              Apr 11 at 9:09


















            up vote
            0
            down vote













            Alternatively you can orchestrate this with a Pipeline job. For example you could have another job doing this (or you could make job A into a pipeline job and skip the first build step)



            build 'A'

            parallel(firstTask: {
            build 'B'
            }, secondTask: {
            build 'C'
            })

            build 'D'





            share|improve this answer





















              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25912639%2fhow-to-build-a-jenkins-project-only-when-two-other-projects-have-successfully-be%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              8
              down vote



              accepted










              The "build after other projects are built" suggested by Akhil will not accomplish the stated goal. It will trigger Project D after either Project B or Project C is built. Use the Join Plugin.






              share|improve this answer

























                up vote
                8
                down vote



                accepted










                The "build after other projects are built" suggested by Akhil will not accomplish the stated goal. It will trigger Project D after either Project B or Project C is built. Use the Join Plugin.






                share|improve this answer























                  up vote
                  8
                  down vote



                  accepted







                  up vote
                  8
                  down vote



                  accepted






                  The "build after other projects are built" suggested by Akhil will not accomplish the stated goal. It will trigger Project D after either Project B or Project C is built. Use the Join Plugin.






                  share|improve this answer












                  The "build after other projects are built" suggested by Akhil will not accomplish the stated goal. It will trigger Project D after either Project B or Project C is built. Use the Join Plugin.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 19 '14 at 14:38









                  EricP

                  67035




                  67035
























                      up vote
                      1
                      down vote













                      There is an option in "Build Triggers" option to "Build after other projects are built". Here is the snapshot for the same:



                      enter image description here



                      In the Projects to watch, mention: Project B, Project C(Note that multiple projects are mentioned with a comma separated value)






                      share|improve this answer

















                      • 3




                        This will trigger after either B or C is built. OP wanted after both.
                        – EricP
                        Sep 19 '14 at 14:40










                      • Multiple projects can be specified like 'abc, def' per the Jenkins UI tooltip.
                        – Vinzz
                        Sep 19 '14 at 15:06










                      • @EricP is right, It will trigger when either B or C is built.
                        – Rachit Agrawal
                        Apr 11 at 9:09















                      up vote
                      1
                      down vote













                      There is an option in "Build Triggers" option to "Build after other projects are built". Here is the snapshot for the same:



                      enter image description here



                      In the Projects to watch, mention: Project B, Project C(Note that multiple projects are mentioned with a comma separated value)






                      share|improve this answer

















                      • 3




                        This will trigger after either B or C is built. OP wanted after both.
                        – EricP
                        Sep 19 '14 at 14:40










                      • Multiple projects can be specified like 'abc, def' per the Jenkins UI tooltip.
                        – Vinzz
                        Sep 19 '14 at 15:06










                      • @EricP is right, It will trigger when either B or C is built.
                        – Rachit Agrawal
                        Apr 11 at 9:09













                      up vote
                      1
                      down vote










                      up vote
                      1
                      down vote









                      There is an option in "Build Triggers" option to "Build after other projects are built". Here is the snapshot for the same:



                      enter image description here



                      In the Projects to watch, mention: Project B, Project C(Note that multiple projects are mentioned with a comma separated value)






                      share|improve this answer












                      There is an option in "Build Triggers" option to "Build after other projects are built". Here is the snapshot for the same:



                      enter image description here



                      In the Projects to watch, mention: Project B, Project C(Note that multiple projects are mentioned with a comma separated value)







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Sep 18 '14 at 14:18









                      Akhil

                      378213




                      378213








                      • 3




                        This will trigger after either B or C is built. OP wanted after both.
                        – EricP
                        Sep 19 '14 at 14:40










                      • Multiple projects can be specified like 'abc, def' per the Jenkins UI tooltip.
                        – Vinzz
                        Sep 19 '14 at 15:06










                      • @EricP is right, It will trigger when either B or C is built.
                        – Rachit Agrawal
                        Apr 11 at 9:09














                      • 3




                        This will trigger after either B or C is built. OP wanted after both.
                        – EricP
                        Sep 19 '14 at 14:40










                      • Multiple projects can be specified like 'abc, def' per the Jenkins UI tooltip.
                        – Vinzz
                        Sep 19 '14 at 15:06










                      • @EricP is right, It will trigger when either B or C is built.
                        – Rachit Agrawal
                        Apr 11 at 9:09








                      3




                      3




                      This will trigger after either B or C is built. OP wanted after both.
                      – EricP
                      Sep 19 '14 at 14:40




                      This will trigger after either B or C is built. OP wanted after both.
                      – EricP
                      Sep 19 '14 at 14:40












                      Multiple projects can be specified like 'abc, def' per the Jenkins UI tooltip.
                      – Vinzz
                      Sep 19 '14 at 15:06




                      Multiple projects can be specified like 'abc, def' per the Jenkins UI tooltip.
                      – Vinzz
                      Sep 19 '14 at 15:06












                      @EricP is right, It will trigger when either B or C is built.
                      – Rachit Agrawal
                      Apr 11 at 9:09




                      @EricP is right, It will trigger when either B or C is built.
                      – Rachit Agrawal
                      Apr 11 at 9:09










                      up vote
                      0
                      down vote













                      Alternatively you can orchestrate this with a Pipeline job. For example you could have another job doing this (or you could make job A into a pipeline job and skip the first build step)



                      build 'A'

                      parallel(firstTask: {
                      build 'B'
                      }, secondTask: {
                      build 'C'
                      })

                      build 'D'





                      share|improve this answer

























                        up vote
                        0
                        down vote













                        Alternatively you can orchestrate this with a Pipeline job. For example you could have another job doing this (or you could make job A into a pipeline job and skip the first build step)



                        build 'A'

                        parallel(firstTask: {
                        build 'B'
                        }, secondTask: {
                        build 'C'
                        })

                        build 'D'





                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          Alternatively you can orchestrate this with a Pipeline job. For example you could have another job doing this (or you could make job A into a pipeline job and skip the first build step)



                          build 'A'

                          parallel(firstTask: {
                          build 'B'
                          }, secondTask: {
                          build 'C'
                          })

                          build 'D'





                          share|improve this answer












                          Alternatively you can orchestrate this with a Pipeline job. For example you could have another job doing this (or you could make job A into a pipeline job and skip the first build step)



                          build 'A'

                          parallel(firstTask: {
                          build 'B'
                          }, secondTask: {
                          build 'C'
                          })

                          build 'D'






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 20 at 11:42









                          Russell Gallop

                          8291925




                          8291925






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25912639%2fhow-to-build-a-jenkins-project-only-when-two-other-projects-have-successfully-be%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Wiesbaden

                              Marschland

                              Dieringhausen