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

milestone step incorrectly detected as running inside parallel

    XMLWordPrintable

Details

    Description

      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    
      }
      

      Attachments

        Activity

          notanother 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'    
              }
          }
          
          notanother 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' } }
          amuniz Antonio Muñiz added a comment - Issue reproduced in a test: https://github.com/jenkinsci/pipeline-milestone-step-plugin/pull/3
          recampbell Ryan Campbell added a comment -

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

          recampbell Ryan Campbell added a comment - svanoort will check with Antonio to see if he can pick this up.
          svanoort Sam Van Oort added a comment -
          svanoort 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

          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_issue_link 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

          Code changed in jenkins
          User: Sam Van Oort
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/pipeline/milestone/MilestoneStepExecution.java
          src/test/java/org/jenkinsci/plugins/pipeline/milestone/MilestoneStepTest.java
          http://jenkins-ci.org/commit/pipeline-milestone-step-plugin/1c90cd15581798e0a35f83ada37aa7a6ba42ba15
          Log:
          Merge pull request #4 from svanoort/fix-parallel-JENKINS-38464

          Fix use of milestone step outside parallel JENKINS-38464

          Compare: https://github.com/jenkinsci/pipeline-milestone-step-plugin/compare/62957781c092...1c90cd155817

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: pom.xml src/main/java/org/jenkinsci/plugins/pipeline/milestone/MilestoneStepExecution.java src/test/java/org/jenkinsci/plugins/pipeline/milestone/MilestoneStepTest.java http://jenkins-ci.org/commit/pipeline-milestone-step-plugin/1c90cd15581798e0a35f83ada37aa7a6ba42ba15 Log: Merge pull request #4 from svanoort/fix-parallel- JENKINS-38464 Fix use of milestone step outside parallel JENKINS-38464 Compare: https://github.com/jenkinsci/pipeline-milestone-step-plugin/compare/62957781c092...1c90cd155817
          svanoort Sam Van Oort added a comment -

          Passed review/test, now going into release as 1.1

          svanoort Sam Van Oort added a comment - Passed review/test, now going into release as 1.1

          People

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

            Dates

              Created:
              Updated:
              Resolved: