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

Only first label in list works correctly in parallel pipeline call

    XMLWordPrintable

Details

    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

          gregcovertsmith Greg Smith created issue -
          gregcovertsmith Greg Smith made changes -
          Field Original Value New Value
          Summary Parallel builds broken - only first label runs Only first label in list works correctly in parallel pipeline call
          gregcovertsmith Greg Smith made changes -
          Component/s workflow-support-plugin [ 21719 ]
          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

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

          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
          gregcovertsmith Greg Smith made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          gregcovertsmith Greg Smith made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: