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

BlueOcean does not show steps after a parallel step inside a script block

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • Jenkins 2.107.1

      I'm using a mostly declarative pipeline. In one of the stages, I have to dynamically spawn parallel stages based on the result of a command:

      def getParallelStageMap(partitions) {
        //...implementation of helper function
      }
      
      pipeline {
        stages {
          stage('example') {
            steps {
              script {
                partitionsString = sh(returnStdout: true, script: '...')
                partitions = partitionsString.trim().split('\n')
                parallel getParallelStageMap(partitions)
                partitions.each { partition ->
                  unstash "stash_${partition}"
                }
              }
              // do some more stuff with the unstashed files
            }
            post {
              // some post steps
            }
          }
        }
      }
      

      This setup works fine, but BlueOcean doesn't show any of the steps after "parallel" (including the post steps) when you click on the "example" stage. They only appear in the log in the classic UI.

          [JENKINS-50337] BlueOcean does not show steps after a parallel step inside a script block

          Denys Digtiar added a comment -

          Hi mb_o. I believe this is a duplicate of the JENKINS-35836 

          Denys Digtiar added a comment - Hi mb_o . I believe this is a duplicate of the  JENKINS-35836  

          I already stumbled upon that other bug while searching for existing issues. Now that I'm re-reading it, you might be right and this could be closed as duplicate.

          However, I'd like to bring to your attention that the "workarounds" mentioned in the other bug report don't help me at all. I'm already trying to use declarative for most of my pipeline, but that doesn't help me at all here.

          I'm also not sure why JENKINS-35836 is marked as "won't fix" while JENKINS-38442 is still open. It seems like the latter would make a solution to the former quite easy...

          Moritz Baumann added a comment - I already stumbled upon that other bug while searching for existing issues. Now that I'm re-reading it, you might be right and this could be closed as duplicate. However, I'd like to bring to your attention that the "workarounds" mentioned in the other bug report don't help me at all. I'm already trying to use declarative for most of my pipeline, but that doesn't help me at all here. I'm also not sure why JENKINS-35836 is marked as "won't fix" while JENKINS-38442 is still open. It seems like the latter would make a solution to the former quite easy...

            Unassigned Unassigned
            mb_o Moritz Baumann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: