-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
2.426.3 and 2.440.1
pipeline {
agent {
node
}
stages {
stage("test") {
steps {
catchError(buildResult:"FAILURE",stageResult:"FAILURE")
}
post {
failure {
println "${env.STAGE_NAME} failed"
}
}
}
stage("test2") {
steps
post {
failure {
println "${env.STAGE_NAME} failed"
}
success {
println "${env.STAGE_NAME} passed"
}
}
}
}
}
I expect that the post for stage2 would execute the success block, but instead it executes the failure block.