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

`when` only stores TagsAction for first occurrence of stage name (matrix limitation)

      see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

      specifically https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/76afff0a26188ad6ced215e4663cd2115c003a74/pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy#L240

      Stage name and ForkScanner is used rather than passing flownodes around.
      It just picks the first stage rather than the correct one.

      This can only happen in matrix pipelines.
      Regular declarative pipelines have this behaviour blocked:

      20:04:25  org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      20:04:25  WorkflowScript: 4: Duplicate stage name: "Skipped" @ line 4, column 5.
      20:04:25         stages {
      

      but matrix can have duplicates:

      pipeline {
          agent none
          stages {
              stage('BuildAndTest') {
                  matrix {
                      agent any
                      axes {
                          axis {
                              name 'PLATFORM'
                              values 'linux', 'windows'
                          }
                          axis {
                              name 'BROWSER'
                              values 'firefox'
                          }
                      }
                      stages {
                          stage('Build') {
                              when {
                                  branch 'testing'
                              }
                              steps {
                                  echo "Do Build for ${PLATFORM} - ${BROWSER}"
                              }
                              
                          }
                      }
                  }
              }
          }
      }
      

      Looks like BlueOcean didn't fully switch to using TagsAction and falls back to not built if nothing is set.

          [JENKINS-72841] `when` only stores TagsAction for first occurrence of stage name (matrix limitation)

          Tim Jacomb created issue -
          Tim Jacomb made changes -
          Description Original: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220 New: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can happen in matrix pipelines.

          Looks like BlueOcean never switched to using TagsAction and just falls back to not built if nothing is set
          Tim Jacomb made changes -
          Description Original: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can happen in matrix pipelines.

          Looks like BlueOcean never switched to using TagsAction and just falls back to not built if nothing is set
          New: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          specifically https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/76afff0a26188ad6ced215e4663cd2115c003a74/pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy#L240

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can happen in matrix pipelines.

          Looks like BlueOcean never switched to using TagsAction and just falls back to not built if nothing is set
          Tim Jacomb made changes -
          Description Original: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          specifically https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/76afff0a26188ad6ced215e4663cd2115c003a74/pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy#L240

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can happen in matrix pipelines.

          Looks like BlueOcean never switched to using TagsAction and just falls back to not built if nothing is set
          New: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          specifically https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/76afff0a26188ad6ced215e4663cd2115c003a74/pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy#L240

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can only happen in matrix pipelines.
          Regular declarative pipelines have this behaviour blocked:
          {code}
          20:04:25 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          20:04:25 WorkflowScript: 4: Duplicate stage name: "Skipped" @ line 4, column 5.
          20:04:25 stages {
          {code}

          but declarative can have duplicates:
          {code}
          pipeline {
              agent none
              stages {
                  stage('BuildAndTest') {
                      matrix {
                          agent any
                          axes {
                              axis {
                                  name 'PLATFORM'
                                  values 'linux', 'windows'
                              }
                              axis {
                                  name 'BROWSER'
                                  values 'firefox'
                              }
                          }
                          stages {
                              stage('Build') {
                                  when {
                                      branch 'testing'
                                  }
                                  steps {
                                      echo "Do Build for ${PLATFORM} - ${BROWSER}"
                                  }
                                  
                              }
                          }
                      }
                  }
              }
          }
          {code}

          Looks like BlueOcean never switched to using TagsAction and just falls back to not built if nothing is set
          Tim Jacomb made changes -
          Description Original: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          specifically https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/76afff0a26188ad6ced215e4663cd2115c003a74/pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy#L240

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can only happen in matrix pipelines.
          Regular declarative pipelines have this behaviour blocked:
          {code}
          20:04:25 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          20:04:25 WorkflowScript: 4: Duplicate stage name: "Skipped" @ line 4, column 5.
          20:04:25 stages {
          {code}

          but declarative can have duplicates:
          {code}
          pipeline {
              agent none
              stages {
                  stage('BuildAndTest') {
                      matrix {
                          agent any
                          axes {
                              axis {
                                  name 'PLATFORM'
                                  values 'linux', 'windows'
                              }
                              axis {
                                  name 'BROWSER'
                                  values 'firefox'
                              }
                          }
                          stages {
                              stage('Build') {
                                  when {
                                      branch 'testing'
                                  }
                                  steps {
                                      echo "Do Build for ${PLATFORM} - ${BROWSER}"
                                  }
                                  
                              }
                          }
                      }
                  }
              }
          }
          {code}

          Looks like BlueOcean never switched to using TagsAction and just falls back to not built if nothing is set
          New: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          specifically https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/76afff0a26188ad6ced215e4663cd2115c003a74/pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy#L240

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can only happen in matrix pipelines.
          Regular declarative pipelines have this behaviour blocked:
          {code}
          20:04:25 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          20:04:25 WorkflowScript: 4: Duplicate stage name: "Skipped" @ line 4, column 5.
          20:04:25 stages {
          {code}

          but matrix can have duplicates:
          {code}
          pipeline {
              agent none
              stages {
                  stage('BuildAndTest') {
                      matrix {
                          agent any
                          axes {
                              axis {
                                  name 'PLATFORM'
                                  values 'linux', 'windows'
                              }
                              axis {
                                  name 'BROWSER'
                                  values 'firefox'
                              }
                          }
                          stages {
                              stage('Build') {
                                  when {
                                      branch 'testing'
                                  }
                                  steps {
                                      echo "Do Build for ${PLATFORM} - ${BROWSER}"
                                  }
                                  
                              }
                          }
                      }
                  }
              }
          }
          {code}

          Looks like BlueOcean never switched to using TagsAction and just falls back to not built if nothing is set
          Tim Jacomb made changes -
          Description Original: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          specifically https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/76afff0a26188ad6ced215e4663cd2115c003a74/pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy#L240

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can only happen in matrix pipelines.
          Regular declarative pipelines have this behaviour blocked:
          {code}
          20:04:25 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          20:04:25 WorkflowScript: 4: Duplicate stage name: "Skipped" @ line 4, column 5.
          20:04:25 stages {
          {code}

          but matrix can have duplicates:
          {code}
          pipeline {
              agent none
              stages {
                  stage('BuildAndTest') {
                      matrix {
                          agent any
                          axes {
                              axis {
                                  name 'PLATFORM'
                                  values 'linux', 'windows'
                              }
                              axis {
                                  name 'BROWSER'
                                  values 'firefox'
                              }
                          }
                          stages {
                              stage('Build') {
                                  when {
                                      branch 'testing'
                                  }
                                  steps {
                                      echo "Do Build for ${PLATFORM} - ${BROWSER}"
                                  }
                                  
                              }
                          }
                      }
                  }
              }
          }
          {code}

          Looks like BlueOcean never switched to using TagsAction and just falls back to not built if nothing is set
          New: see https://github.com/jenkinsci/pipeline-graph-view-plugin/issues/220

          specifically https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/76afff0a26188ad6ced215e4663cd2115c003a74/pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy#L240

          Stage name and ForkScanner is used rather than passing flownodes around.
          It just picks the first stage rather than the correct one.

          This can only happen in matrix pipelines.
          Regular declarative pipelines have this behaviour blocked:
          {code}
          20:04:25 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          20:04:25 WorkflowScript: 4: Duplicate stage name: "Skipped" @ line 4, column 5.
          20:04:25 stages {
          {code}

          but matrix can have duplicates:
          {code}
          pipeline {
              agent none
              stages {
                  stage('BuildAndTest') {
                      matrix {
                          agent any
                          axes {
                              axis {
                                  name 'PLATFORM'
                                  values 'linux', 'windows'
                              }
                              axis {
                                  name 'BROWSER'
                                  values 'firefox'
                              }
                          }
                          stages {
                              stage('Build') {
                                  when {
                                      branch 'testing'
                                  }
                                  steps {
                                      echo "Do Build for ${PLATFORM} - ${BROWSER}"
                                  }
                                  
                              }
                          }
                      }
                  }
              }
          }
          {code}

          Looks like BlueOcean didn't fully switch to using TagsAction and falls back to not built if nothing is set.
          Tim Jacomb made changes -
          Summary Original: `when` only stores TagsAction for first occurrence of stage name New: `when` only stores TagsAction for first occurrence of stage name (matrix limitation)
          Tim Jacomb made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Tim Jacomb made changes -
          Assignee New: Tim Jacomb [ timja ]
          Tim Jacomb made changes -
          Remote Link New: This issue links to "https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/698 (Web Link)" [ 29513 ]
          Tim Jacomb made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

            timja Tim Jacomb
            timja Tim Jacomb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: