Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33837

Option to wait for transitive downstream builds to complete

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Given a pipeline script, I configure to execute a build step to build a (existing) job:

      build job: 'Project-Build-Job1_Kickoff', wait: true

      The job is triggered successfully, and the pipeline waits for its completion. But, the called build job has a post-build action defined of kind "trigger parameterized build on other project". The pipeline does not wait for the downstream build, only for the first one in the chain which is referenced by name in the pipeline script. It is expected that the existing functionality is used and embedded "as is", thus pipeline waits for completion of complete downstream chain.

      Update: this works as a sequence of build jobs linked with Post Build Actions. Triggering the first one via Pipeline, the downstreamed ones are triggered as well, but the Pipeline does not block until completion. This is critical because this prevents migration.

        Attachments

          Issue Links

            Activity

            michaelhuettermann Michael Hüttermann created issue -
            michaelhuettermann Michael Hüttermann made changes -
            Field Original Value New Value
            Epic Link JENKINS-31152 [ 165808 ]
            michaelhuettermann Michael Hüttermann made changes -
            Description Given a pipeline script, I configure to execute a build step to build a (existing) job:
            {code}build job: 'Project-QA-Build-Step1_Kickoff', wait: true{code}

            The job is triggered successfully, and the pipeline waits for its completion. But, the called build job has a post-build action defined of kind "trigger parameterized build on other project". The pipeline does not wait for the downstream build, only for the first one in the chain which is referenced by name in the pipeline script. It is expected that the existing functionality is used and embedded "as is", thus pipeline waits for completion of complete downstream chain.

            Given a pipeline script, I configure to execute a build step to build a (existing) job:
            {code}build job: 'Project-Build-Job1_Kickoff', wait: true{code}

            The job is triggered successfully, and the pipeline waits for its completion. But, the called build job has a post-build action defined of kind "trigger parameterized build on other project". The pipeline does not wait for the downstream build, only for the first one in the chain which is referenced by name in the pipeline script. It is expected that the existing functionality is used and embedded "as is", thus pipeline waits for completion of complete downstream chain.

            amuniz Antonio Muñiz made changes -
            Component/s workflow-plugin [ 18820 ]
            Component/s pipeline-stage-view-plugin [ 21139 ]
            amuniz Antonio Muñiz made changes -
            Assignee Antonio Muñiz [ amuniz ]
            michaelhuettermann Michael Hüttermann made changes -
            Description Given a pipeline script, I configure to execute a build step to build a (existing) job:
            {code}build job: 'Project-Build-Job1_Kickoff', wait: true{code}

            The job is triggered successfully, and the pipeline waits for its completion. But, the called build job has a post-build action defined of kind "trigger parameterized build on other project". The pipeline does not wait for the downstream build, only for the first one in the chain which is referenced by name in the pipeline script. It is expected that the existing functionality is used and embedded "as is", thus pipeline waits for completion of complete downstream chain.

            Given a pipeline script, I configure to execute a build step to build a (existing) job:
            {code}build job: 'Project-Build-Job1_Kickoff', wait: true{code}

            The job is triggered successfully, and the pipeline waits for its completion. But, the called build job has a post-build action defined of kind "trigger parameterized build on other project". The pipeline does not wait for the downstream build, only for the first one in the chain which is referenced by name in the pipeline script. It is expected that the existing functionality is used and embedded "as is", thus pipeline waits for completion of complete downstream chain.

            Update: this works as a sequence of build jobs linked with Post Build Actions. Triggering the first one via Pipeline, the downstreamed ones are triggered as well, but the Pipeline does not block until completion.

            michaelhuettermann Michael Hüttermann made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            michaelhuettermann Michael Hüttermann made changes -
            Description Given a pipeline script, I configure to execute a build step to build a (existing) job:
            {code}build job: 'Project-Build-Job1_Kickoff', wait: true{code}

            The job is triggered successfully, and the pipeline waits for its completion. But, the called build job has a post-build action defined of kind "trigger parameterized build on other project". The pipeline does not wait for the downstream build, only for the first one in the chain which is referenced by name in the pipeline script. It is expected that the existing functionality is used and embedded "as is", thus pipeline waits for completion of complete downstream chain.

            Update: this works as a sequence of build jobs linked with Post Build Actions. Triggering the first one via Pipeline, the downstreamed ones are triggered as well, but the Pipeline does not block until completion.

            Given a pipeline script, I configure to execute a build step to build a (existing) job:
            {code}build job: 'Project-Build-Job1_Kickoff', wait: true{code}

            The job is triggered successfully, and the pipeline waits for its completion. But, the called build job has a post-build action defined of kind "trigger parameterized build on other project". The pipeline does not wait for the downstream build, only for the first one in the chain which is referenced by name in the pipeline script. It is expected that the existing functionality is used and embedded "as is", thus pipeline waits for completion of complete downstream chain.

            Update: this works as a sequence of build jobs linked with Post Build Actions. Triggering the first one via Pipeline, the downstreamed ones are triggered as well, but the Pipeline does not block until completion. This is critical because this prevents migration.

            Hide
            jglick Jesse Glick added a comment -

            As designed—you should either make the immediate downstream project use a blocking trigger, or remove the triggers from the freestyle projects entirely and use Pipeline to orchestrate the whole thing—though it would be useful to have such an option for integration with existing freestyle project chains.

            Show
            jglick Jesse Glick added a comment - As designed—you should either make the immediate downstream project use a blocking trigger, or remove the triggers from the freestyle projects entirely and use Pipeline to orchestrate the whole thing—though it would be useful to have such an option for integration with existing freestyle project chains.
            jglick Jesse Glick made changes -
            Epic Link JENKINS-31152 [ 165808 ]
            jglick Jesse Glick made changes -
            Issue Type Bug [ 1 ] New Feature [ 2 ]
            Labels 2.0
            Priority Critical [ 2 ] Major [ 3 ]
            Summary Pipelines: Blocking also for subsequent downstream jobs Option to wait for transitive downstream builds to complete
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-28021 [ JENKINS-28021 ]
            Hide
            michaelhuettermann Michael Hüttermann added a comment -

            Hi Jesse Glick, yes, exactly, as described, the use case is to have an option for integration with existing project chains.
            It could be particular intersting for users to have this option as part of a migration path, which is often helpful with new versions of tools.

            Show
            michaelhuettermann Michael Hüttermann added a comment - Hi Jesse Glick , yes, exactly, as described, the use case is to have an option for integration with existing project chains. It could be particular intersting for users to have this option as part of a migration path, which is often helpful with new versions of tools.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 169832 ] JNJira + In-Review [ 183656 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Component/s pipeline-build-step-plugin [ 21707 ]
            Component/s pipeline [ 21692 ]
            Hide
            abayer Andrew Bayer added a comment -

            If the downstream build doesn't itself wait for its own downstreams to complete, I don't think it makes sense to add additional logic to the build step to watch for downstreams of the downstreams and so forth and wait for them too.

            Show
            abayer Andrew Bayer added a comment - If the downstream build doesn't itself wait for its own downstreams to complete, I don't think it makes sense to add additional logic to the build step to watch for downstreams of the downstreams and so forth and wait for them too.
            abayer Andrew Bayer made changes -
            Resolution Won't Fix [ 2 ]
            Status Open [ 1 ] Resolved [ 5 ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              michaelhuettermann Michael Hüttermann
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: