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

Pipeline matrix stages do not render

XMLWordPrintable

      I have encountered a repeatable issue with build visualization when using matrix in declarative syntax. There is already a bug JENKINS-63952 created under the blueocean-plugin in 2020 that appears to be the same issue but the problem affects the job's "Stage View" as well as Blue Ocean, therefore I believe it would be more appropriate to address here. Sorry if this is considered a duplicate for the same issue.

      Here is the example pipeline posted by Marcel in the blueocean case:

      PROPS = [
          'a': true,
          'b': false,
          'c': true
      ]
      
      pipeline {
          agent none
          stages {
              stage('Main') {
                  matrix {
                      axes {
                          axis {
                              name 'APP'
                              values 'a', 'b', 'c'
                          }
                      }
                      stages {
                          stage('first') {
                              when {
                                  expression {
                                      return PROPS[APP]
                                  }
                              }
                              steps {
                                  echo APP
                              }
                          }
                      }
                  }
              }
          }
      }
      

      And screenshots with the incorrect visualization:

      In Blue Ocean, logs for axis value 'a' are omitted/unavailable:

      In the Stage View, logs for the axis value 'a' are not reported:

      However the console log includes the output from axis value 'a':

       

      Examining the console output is not practical for larger/noisy pipelines and I have not found a workaround for my team's particular case. Even though the stages do run, it seems like this is a significant gap in functionality because of the extra effort required to analyze the behavior of a build.

      Does a workaround exist? Adding "sleep" instructions (as mentioned in JENKINS-63952) did not have an impact in my team's situation. 

       

       

        1. image-2022-02-22-15-05-13-809.png
          35 kB
          John Smith
        2. image-2022-02-22-15-07-33-229.png
          174 kB
          John Smith
        3. image-2022-02-22-15-11-19-351.png
          84 kB
          John Smith

            Unassigned Unassigned
            john0991 John Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: