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

Logs are not correctly shown when parallel stage are skipped by when directive

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • blueocean-plugin
    • None
    • Jenkins 2.138.2

      pipeline {
          agent any
          options {
              buildDiscarder logRotator(artifactNumToKeepStr: '5', numToKeepStr: '5')
          }
          stages {
              stage ("Parallel") {
                  parallel {
                      stage ("Path 1") {
                          steps {
                              sh 'sleep 60'
                          }
                      }
                      stage ("Path 2") {
                          when {
                              branch 'dummy_for_easy_stage_skip'
                              beforeAgent true
                          }
                          steps {
                              sh 'sleep 60'
                          }
                      }
                  }
              }
          }
      }
      

       
      As long this pipeline runs you cannot see the log for the stage "Path 1". This is problematic on long runs with many steps.

      Additional the message "Queued: Waiting for run to start" on both stages is misleading, as the first stage is running and the second stage is skipped already.

            Unassigned Unassigned
            tkleiber Torsten Kleiber
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: