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

Milestone can be passed by older build if another build exits early


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Using pipeline-milestone-step-plugin 1.3.1, Jenkins 2.61

      See attached Jenkinsfile, containing an initial input step and then several milestones.  The stage blocks make the problem a bit more visible in the pipeline view, but I can reproduce the issue without them.

      Steps to reproduce:

      1. Create a job with this Jenkinsfile.
      2. Start three builds.  They all pause for input.
      3. On the newest build (#3), click continue. It completes each stage successfully.
      4. On the oldest build (#1), click continue. It fails at the first milestone as expected.
      5. On the middle build (#2), click continue.

      Expected results:

      The middle build should stop at the first milestone.

      Actual results:

      The middle build continues successfully through the milestones until reaching the final milestone.  Only the final milestone fails.

      The impact of this could be quite high if the milestones are controlling access to deploy steps, as it could lead to older builds being deployed unexpectedly.

      Possible workaround

      Add an extra milestone at the start of the script, before the input step.  Earlier jobs are then killed when the newest job continues.


            amuniz Antonio Muñiz
            timretout Tim Retout
            2 Vote for this issue
            5 Start watching this issue