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

Only first label in list works correctly in parallel pipeline call

    Details

    • Similar Issues:

      Description

      Today we updated our plugins to the latest available. This included updating Pipeline API from 2.4 -> 2.5 and Pipleline Groovy 2.19 -> 2.20

      After we did that, our parallel builds began failing. We have a series of builds that run exactly the same function on several different label's nodes. Only the first action in the list of items submitted to Parallel works – all of the others result in these errors:

      [centos5x32] Failed in branch centos5x32
      [centos5] Failed in branch centos5
      [macosx1010] Failed in branch macosx1010

      The first item in the generated list runs fine – all others in the parallel fail with the "Failed in branch"

      Here is the code that sets up the parallel

      def nodeNames = ['windows10', 'centos5x32', 'centos5', 'macosx10.10'] // labels for Jenkins node types we will build on
      
      def builders = [:]
      for (x in nodeNames) {
          def label = x 
      
          // Create a map to pass in to the 'parallel' step so we can fire all the builds at once
          builders[label] = {
              node(label) {
                  commonBuild(label)
              }
          }
      }
      
      try {
      	stage ('Parallel Build') {
      		parallel builders
      	}
      } catch(e) {
      	currentBuild.result = "FAILED"
      	throw e
      } 
      

      Again, this build ran fine right before the plugins were updated, and failed after. Putting this within a method, and then marking that method as @NonCPS seemed to help – it a least allowed all 4 nodes to start in parallel.

        Attachments

          Activity

          Hide
          gregcovertsmith Greg Smith added a comment -

          This seems to have been a problem with the Pipeline Supporting Steps (component workflow-support) that has been fixed in the 2.10 release

          Show
          gregcovertsmith Greg Smith added a comment - This seems to have been a problem with the Pipeline Supporting Steps (component workflow-support) that has been fixed in the 2.10 release
          Hide
          gregcovertsmith Greg Smith added a comment -

          I am sure this is a dup of something, but can not find it.

          Issues with 2.9 -> 2.10 was listed here:
          https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Supporting+APIs+Plugin

          Show
          gregcovertsmith Greg Smith added a comment - I am sure this is a dup of something, but can not find it. Issues with 2.9 -> 2.10 was listed here: https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Supporting+APIs+Plugin

            People

            • Assignee:
              Unassigned
              Reporter:
              gregcovertsmith Greg Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: