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

Jenkins parallel pipeline: All subroutine calls in parameter blocks pass arguments from last block

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We are using a goovy-script in a parallel step and using an external method.
      I am expecting the parameter value dumped in [aaa] to be 'aaa', not 'eee'.

      def build_if_needed(project) {
        println "build_if_needed: $project"
        // ultimately this will kick off a build job...
      }
      
      parallel (
        aaa : { build_if_needed('aaa')},
        bbb : { build_if_needed('bbb')},
        ccc : { build_if_needed('ccc')},
        ddd : { build_if_needed('ddd')},
        eee : { build_if_needed('eee')}
      )
      

      The result is:

      [Pipeline] parallel
      [Pipeline] [aaa] { (Branch: aaa)
      [Pipeline] [bbb] { (Branch: bbb)
      [Pipeline] [ccc] { (Branch: ccc)
      [Pipeline] [ddd] { (Branch: ddd)
      [Pipeline] [eee] { (Branch: eee)
      [Pipeline] [aaa] echo
      [aaa] build_if_needed: eee
      [Pipeline] [aaa] }
      [Pipeline] [bbb] echo
      [bbb] build_if_needed: eee
      [Pipeline] [bbb] }
      [Pipeline] [ccc] echo
      [ccc] build_if_needed: eee
      [Pipeline] [ccc] }
      [Pipeline] [ddd] echo
      [ddd] build_if_needed: eee
      [Pipeline] [ddd] }
      [Pipeline] [eee] echo
      [eee] build_if_needed: eee
      [Pipeline] [eee] }
      [Pipeline] // parallel
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            Fixed as part of JENKINS-26481

            Show
            abayer Andrew Bayer added a comment - Fixed as part of JENKINS-26481

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              george_stark Sascha Vujevic
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: