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

Projects building at the same time despite "Block build when upstream is building" option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None
    • Windows and hudson 1.337

      If you have multiple executors (or multiple nodes) then the "Block build when upstream project is building" advanced option is not blocking downstream project during the build of upstream project. Instead, it starts the downstream project immediatelly when upstream starts to build!

      This is the opposite behaviour than help describes: "When this option is checked, Hudson will prevent the project from building when a dependency of this project is in the queue, or building."

      How to reproduce this isse:
      1. Set up 2 or more executors (the same happens with multiple slave nodes) and set quiet period to 0 (to speed up the test)
      2. Create job1 whith these settings:
      -build periodically (or SCM poll), eg. */5 * * * *
      -add a lengthy build step (eg. ping 127.0.0.1 -w 1000 -n 600)
      3. Create job2 with these settings:
      -the same build period as job1 (or at least overlap the build step of job1)
      -set a lengthy build step (eg. ping 127.0.0.1 -w 1000 -n 600)
      -under "Advanced Project Options" check the "Block build when upstream project is building" option!
      -set the "Build after other projects are built" build trigger to job1
      4. Wait until job1 starts
      5. Check job2 build history! It will start building immediatelly!

      The very same happens when you have multiple slave nodes with 1-1 executors.

            kohsuke Kohsuke Kawaguchi
            balazsdan balazsdan
            Votes:
            15 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated: