Hi there,
Does the currentbuild variable stores where the pipeline failed when using Stages with parallel and failFast = true? For instance:
pipeline {
agent any
stages {
stage('Stage 1') {
steps {
parallel(
afs_release: { ... },
afs_format: { ... },
failFast: true
)}
},
stage('Stage 2') { ... }
}
post {
failure { echo "Failed in the Stage 1 branch afs_format" } // this is hardcoded although I'd like to query this dynamically
}
}
If the branch "afs_format" failed then I'd like to catch that failure and proceed it at the very end of the post with a customised message.
But as far as I see currentbuild doesn't care about stages/branches but the build itself,
any hints how I can detect what's the failed stage and within the stage what branch caused that failure?
Thanks