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

'build' does not wait downstreams job to complete

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: pipeline
    • Labels:
      None
    • Environment:
      Jenkins 1.609
      Workflow 1.5
    • Similar Issues:

      Description

      I setup two freestyle jobs Job 1 and Job 2. Job 2 is a downstream job of Job 1 (Job 1 builds Job 2 as a post build action). Job 2 always fails.

      I setup a Workflow project with:

      build job: 'Job 1', propagate: true, wait: true
      

      Even if propagate and wait are set to true, my workflow project never waits for Job 2 completion and thus never fails.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            The flow is doing what you requested: starting Job 1, and waiting for it to complete, which it does (successfully). The fact that it happened to trigger a downstream job is irrelevant. (It may not even know about the downstream job, if that is using a reverse build trigger.)

            If you meant for Job 1 to wait for Job 2 to finish before itself completing, you would need to use the Parameterized Trigger plugin (or make Job 1 itself a workflow using build with wait: true).

            Show
            jglick Jesse Glick added a comment - The flow is doing what you requested: starting Job 1, and waiting for it to complete, which it does (successfully). The fact that it happened to trigger a downstream job is irrelevant. (It may not even know about the downstream job, if that is using a reverse build trigger.) If you meant for Job 1 to wait for Job 2 to finish before itself completing, you would need to use the Parameterized Trigger plugin (or make Job 1 itself a workflow using build with wait: true ).
            Hide
            nithril Nicolas Labrot added a comment - - edited

            Thanks, I misread the documentation: wait for completion of the downstream build. is in singular

            Show
            nithril Nicolas Labrot added a comment - - edited Thanks, I misread the documentation: wait for completion of the downstream build. is in singular

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              nithril Nicolas Labrot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: