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

Input step not shown in post when there are nested stages

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.277.4
      Pipeline Stage View 2.19

       This pipeline is handled correctly by the stage view: "Install simple" is paused and prompts for input:

      pipeline {
          agent any
          stages {
              stage('Build') {
                  steps {
                      sh 'true'
                  }
              }
              stage('Install simple') {
                  steps {
                      sh 'false'
                  }
                  post {
                      failure {
                          input message: "Rollback?", ok: "Rollback"
                      }
                  }
              }
          }
      }
      

       

      Both of these pipelines do not work correctly: The inner stage is marked as failed and the outer stage is marked as success:

      pipeline {
          agent any
          stages {
              stage('Build') {
                  steps {
                      sh 'true'
                  }
              }
              stage('Install sequential') {
      			stages {
      				stage('Install DB') {
      					steps {
      						sh 'true'
      					}
      				}
      				stage('Install App') {
      					steps {
      						sh 'false'
      					}
      				}
      			}
                  post {
                      failure {
                          input message: "Rollback?", ok: "Rollback"
                      }
                  }
              }
          }
      }
      
      pipeline {
          agent any
          stages {
              stage('Build') {
                  steps {
                      sh 'true'
                  }
              }
              stage('Install sequential') {
      			stages {
      				stage('Install DB') {
      					steps {
      						sh 'true'
      					}
      				}
      				stage('Install App') {
      					steps {
      						sh 'false'
      					}
      				}
      			}
                  post {
                      failure {
                          input message: "Rollback?", ok: "Rollback"
                      }
                  }
              }
          }
      }
      

       Instead, the outer stage should be paused and prompt for input.

          [JENKINS-65668] Input step not shown in post when there are nested stages

          Alexey Marin created issue -
          Alexey Marin made changes -
          Link New: This issue is related to JENKINS-41164 [ JENKINS-41164 ]
          Alexey Marin made changes -
          Description Original:  

          This pipeline is handled correctly by the stage view: "Install simple" is paused and prompts for input:
          {code:java}
          pipeline {
              agent any
              stages {
                  stage('Build') {
                      steps {
                          sh 'true'
                      }
                  }
                  stage('Install simple') {
                      steps {
                          sh 'false'
                      }
                      post {
                          failure {
                              input message: "Rollback?", ok: "Rollback"
                          }
                      }
                  }
              }
          }
          {code}
           

          Both of these pipelines do not work correctly: The inner stage is marked as failed and the outer stage is marked as success (see the screenshot).

           
          {code:java}
          pipeline {
              agent any
              stages {
                  stage('Build') {
                      steps {
                          sh 'true'
                      }
                  }
                  stage('Install sequential') {
          stages {
          stage('Install DB') {
          steps {
          sh 'true'
          }
          }
          stage('Install App') {
          steps {
          sh 'false'
          }
          }
          }
                      post {
                          failure {
                              input message: "Rollback?", ok: "Rollback"
                          }
                      }
                  }
              }
          }
          {code}
          {code:java}
          pipeline {
              agent any
              stages {
                  stage('Build') {
                      steps {
                          sh 'true'
                      }
                  }
                  stage('Install sequential') {
          stages {
          stage('Install DB') {
          steps {
          sh 'true'
          }
          }
          stage('Install App') {
          steps {
          sh 'false'
          }
          }
          }
                      post {
                          failure {
                              input message: "Rollback?", ok: "Rollback"
                          }
                      }
                  }
              }
          }
          {code}
           

          Instead, the outer stage should be paused and prompt for input.
          New:  This pipeline is handled correctly by the stage view: "Install simple" is paused and prompts for input:
          {code:java}
          pipeline {
              agent any
              stages {
                  stage('Build') {
                      steps {
                          sh 'true'
                      }
                  }
                  stage('Install simple') {
                      steps {
                          sh 'false'
                      }
                      post {
                          failure {
                              input message: "Rollback?", ok: "Rollback"
                          }
                      }
                  }
              }
          }
          {code}
           

          Both of these pipelines do not work correctly: The inner stage is marked as failed and the outer stage is marked as success:

          !image-2021-05-19-11-57-20-267.png|thumbnail!
          {code:java}
          pipeline {
              agent any
              stages {
                  stage('Build') {
                      steps {
                          sh 'true'
                      }
                  }
                  stage('Install sequential') {
          stages {
          stage('Install DB') {
          steps {
          sh 'true'
          }
          }
          stage('Install App') {
          steps {
          sh 'false'
          }
          }
          }
                      post {
                          failure {
                              input message: "Rollback?", ok: "Rollback"
                          }
                      }
                  }
              }
          }
          {code}
          {code:java}
          pipeline {
              agent any
              stages {
                  stage('Build') {
                      steps {
                          sh 'true'
                      }
                  }
                  stage('Install sequential') {
          stages {
          stage('Install DB') {
          steps {
          sh 'true'
          }
          }
          stage('Install App') {
          steps {
          sh 'false'
          }
          }
          }
                      post {
                          failure {
                              input message: "Rollback?", ok: "Rollback"
                          }
                      }
                  }
              }
          }
          {code}
           Instead, the outer stage should be paused and prompt for input.
          Alexey Marin made changes -
          Environment New: Jenkins 2.277.4
          Pipeline Stage View 2.19
          Mark Waite made changes -
          Assignee Original: Sam Van Oort [ svanoort ]

            Unassigned Unassigned
            onodera Alexey Marin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: