I do not use declarative pipelines, i use scripted pipelines, but I think you can get the result and some other information from the objects afs_release and afs_format like this:
afs_release.getResult On Mon, Aug 14, 2017 at 11:48 AM, Victor Martinez < [email protected]> wrote: > 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 > > > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/a53685e0-6d39-4fc6-8ed0-463d0a21eb1a%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/a53685e0-6d39-4fc6-8ed0-463d0a21eb1a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Dick Ginga Build Engineer [email protected] -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAL3PpaW%3DN6Cd9HeaPcCcY9MhM%3Dc0Pk8H_RaGJ_GJav0mSdFdFA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
