The post-unsuccessful block of my declarative pipeline is triggered even if the build is successful!
Excerpt from my Jenkinsfile
pipeline { stages { ... } post { always { ... } success { ... } unsuccessful { script { echo "Build results: ${currentBuild.result} - ${currentBuild.currentResult}" ... } } } }
And I can see `Build results: SUCCESS - SUCCESS` in the pipeline output - and the other steps of the unsuccessful block executed as well, of course
I noticed this as well in https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/313, (the main point of that PR is not related, I just happened to see it) and added a fix for it there. See https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/313#discussion_r259517064 specifically.
The fix for this issue was released in version 1.3.5 of the Pipeline: Declarative Plugin.
Bulk closing resolved issues.