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

Steps from post actions are not visible when used with parallel stages

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Trivial
    • Resolution: Unresolved
    • Component/s: blueocean-plugin
    • Environment:
    • Similar Issues:

      Description

      I'm using declarative pipeline and the steps from the post actions are not visible when there are parallel stages inside stages directive, but they are shown when there are only sequential stages in jenkinsfile. The actions from post are executed because I can see them in the log file, but the steps are simply not visible. You can see from the following 2 jenkinsfiles that only in the 2nd one the echo "hi from post" step is visible

      1) This jenkinsfile is not working properly (uses parallel stages) (see attachment log-parallel.txt for logs):

      
      pipeline {
        agent none
      
        stages {
          stage('Parallel Stages') {
            parallel {
              stage('Stage 1') {
                steps {
                  node(label: 'ec2_node_bigger') {
                    sh 'echo "hi from 1"'
                  }
                }
              }
      
              stage('Stage 2') {
                steps {
                  node(label: 'ec2_node_bigger') {
                    sh 'echo "hi from 2"'
                  }
                }
              }
      
            }
      
          }
          
        }
      
        post {
          always {
            node(label: 'ec2_node_bigger') {
              sh 'echo "hi from post"'
            }
          }
        }
      
      }
      

      Screenshot from blue ocean interface:

      2) This jenkinsfile is working as expected (does not use parallel stages) (see attachment log-sequential.txt for logs):

      pipeline {
        agent none
      
        stages {
          stage('Stage 1') {
            steps {
              node(label: 'ec2_node_bigger') {
                sh 'echo "hi from 1"'
              }
            }
          }
      
          stage('Stage 2') {
            steps {
              node(label: 'ec2_node_bigger') {
                sh 'echo "hi from 2"'
              }
            }
          }
      
        }
      
        post {
          always {
            node(label: 'ec2_node_bigger') {
              sh 'echo "hi from post"'
            }
          }
        }
      
      }
      

      Screenshot from blue ocean interface:

        Attachments

          Activity

          alexbuicescu Alex Buicescu created issue -
          alexbuicescu Alex Buicescu made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Trivial [ 5 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              alexbuicescu Alex Buicescu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: