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

parallel block from groovy module not shown under its stage

XMLWordPrintable

      @Library(value='team@/branches/mybranch/Jenkins', checkout=false) _
      
      def targets = ['Linux x64', 'Mac x64']
      
      pipeline {
        ....
        stages {
          stage('Workspace Cleanup and Update') {
            // /mybranch/enkins/vars/svn_co.groovy
            svn_co(env.BRANC_NAME, targets)
          }
        }
      }

      Running this (I've greatly simplified here) where the svn_co.groovy script contains a parallel block, results in the attached (1st pic) unexpected pipeline layout.  Before I moved the parallel block to the groovy script, the parallel steps were listed under the stage (2nd pic).

      I have two instances of the above with almost the same code for running parallel tasks. One looks as expected (right pic below) and the other looks like the left pic.  The big difference between the two is the one that does not formatted as expected calls a function defined in vars (I also tried defining it in the same groovy script, but still a separate function).  The one that looks right is all self-contained in the parallel block.

       

      Looks right:

      pipeline -> docker_image_gen (contains parallel block)

      Looks wrong:

      pipeline -> svn_co (parallel block that calls) -> checkout_function

       

            kerrhome Shannon Kerr
            kerrhome Shannon Kerr
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: