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

milestone step incorrectly detected as running inside parallel

      The following jenkins pipeline snippets results in "ERROR: Using a milestone step inside parallel is not allowed". But the milestone step is not used inside the parallel, it is outside.

      parallel (
          foo: {}, bar: {}
      )
      stage ('test') {
          milestone 1    
      }
      

          [JENKINS-38464] milestone step incorrectly detected as running inside parallel

          Jimmy Praet created issue -

          Tim McNally added a comment - - edited

          Ran into this as well. It seems to fail if the milestone is inside any block if a parallel block is in the script.
          The following works.

          parallel (
              foo: {}, bar: {}
          )
          milestone 1
          stage ('test') {
              echo 'hello'    
          }
          

          Where as this will fail.

          timestamps {
              parallel (
                  foo: {}, bar: {}
              )
              milestone 1
              stage ('test') {
                  echo 'hello'    
              }
          }
          

          Yet this will work.

          timestamps {
              milestone 1
              stage ('test') {
                  echo 'hello'    
              }
          }
          

          Tim McNally added a comment - - edited Ran into this as well. It seems to fail if the milestone is inside any block if a parallel block is in the script. The following works. parallel ( foo: {}, bar: {} ) milestone 1 stage ('test') { echo 'hello' } Where as this will fail. timestamps { parallel ( foo: {}, bar: {} ) milestone 1 stage ('test') { echo 'hello' } } Yet this will work. timestamps { milestone 1 stage ('test') { echo 'hello' } }

          Antonio Muñiz added a comment - Issue reproduced in a test: https://github.com/jenkinsci/pipeline-milestone-step-plugin/pull/3
          Antonio Muñiz made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

          Ryan Campbell added a comment -

          svanoort will check with Antonio to see if he can pick this up.

          Ryan Campbell added a comment - svanoort will check with Antonio to see if he can pick this up.
          Sam Van Oort made changes -
          Assignee Original: Antonio Muñiz [ amuniz ] New: Sam Van Oort [ svanoort ]

          Sam Van Oort added a comment -

          Sam Van Oort added a comment - After synching with amuniz I'm golden to pick this up as long as https://github.com/jenkinsci/pipeline-milestone-step-plugin/pull/3/commits/b4197922a80a9143912fa4553567f8d1222d02d1 is cherry-picked in
          Sam Van Oort made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Sam Van Oort made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

          Code changed in jenkins
          User: Antonio Muñiz
          Path:
          src/test/java/org/jenkinsci/plugins/pipeline/milestone/MilestoneStepTest.java
          http://jenkins-ci.org/commit/pipeline-milestone-step-plugin/b4197922a80a9143912fa4553567f8d1222d02d1
          Log:
          JENKINS-38464 Reproduced in a test

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Antonio Muñiz Path: src/test/java/org/jenkinsci/plugins/pipeline/milestone/MilestoneStepTest.java http://jenkins-ci.org/commit/pipeline-milestone-step-plugin/b4197922a80a9143912fa4553567f8d1222d02d1 Log: JENKINS-38464 Reproduced in a test

            svanoort Sam Van Oort
            jpraet Jimmy Praet
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: