I feel like I have read how to do this somewhere already but now that I need it I can't find it. I am trying to duplication the behavior of the mailer within a workflow script. Namely if the build failed send an e-mail. If it succeed but the previous build failed, send a different email. In order to do this, I need to access the build object (something that implements AbstractBuild and Run) for the current, in-flight build, so that I can get the current result and the previous build result. Can someone advise as to how to do this? Or is there a functionally built into the mail step that I can leverage somehow to send different messages/subjects based on current and previous build status?
It seems like this is going to be a common need in workflow so perhaps adding an example somewhere in the docs of how to do this might be in order? -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b0fb68ae-61ff-4103-8af6-efe808af1518%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.