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

Input step not shown in post when there are nested stages

    XMLWordPrintable

Details

    Description

       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.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              svanoort Sam Van Oort
              onodera Alexey Marin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: