Q: Can you limit the scope of the "post" block in Jenkins to the stage result status I am trying to execute a script based on the result of a particular stage in a Jenkins declarative pipeline, but the post block seems to be dependent on the status of the entire pipeline. Any way of doing this?
Example:
pipeline {
  stages{
    stage("A"){
     //results in unstable
    }
    stage("B"){
      steps{
        ...
        //successful stage execution
       }
      post{
         success {
          script { 
            // never executes since the pipeline status is unstable
            // how can I get here since the stage was successful?
          }
         }
       }
     }
   }
}

here are the docs, in case I missed it: https://www.jenkins.io/doc/book/pipeline/syntax/#post
