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

milestone step incorrectly detected as running inside parallel

    XMLWordPrintable

    Details

    • Similar Issues:

      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

          jpraet Jimmy Praet created issue -
          Hide
          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'    
              }
          }
          
          Show
          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' } }
          Hide
          amuniz Antonio Muñiz added a comment -
          Show
          amuniz Antonio Muñiz added a comment - Issue reproduced in a test: https://github.com/jenkinsci/pipeline-milestone-step-plugin/pull/3
          amuniz Antonio Muñiz made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Major [ 3 ]
          Hide
          recampbell Ryan Campbell added a comment -

          Sam Van Oort will check with Antonio to see if he can pick this up.

          Show
          recampbell Ryan Campbell added a comment - Sam Van Oort will check with Antonio to see if he can pick this up.
          svanoort Sam Van Oort made changes -
          Assignee Antonio Muñiz [ amuniz ] Sam Van Oort [ svanoort ]
          Hide
          svanoort Sam Van Oort added a comment -
          Show
          svanoort Sam Van Oort added a comment - After synching with Antonio Muñiz 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
          svanoort Sam Van Oort made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          svanoort Sam Van Oort made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          Hide
          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

          Show
          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
          Hide
          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

          Show
          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
          Hide
          svanoort Sam Van Oort added a comment -

          Passed review/test, now going into release as 1.1

          Show
          svanoort Sam Van Oort added a comment - Passed review/test, now going into release as 1.1
          svanoort Sam Van Oort made changes -
          Status In Review [ 10005 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: