The best way to find out is to try it. We're willing to help if you get stuck, but you also need to try things yourself and figure things out. We're not going to write your script for you.
On Thu, Feb 2, 2017 at 7:34 AM siva varma Datla <sivavarma...@gmail.com> wrote: > So you say this should work?? > > node { > > if (result.toString() != "SUCCESS") { > notifyFailure() > } else { > notifySuccessful() > } > > } > > On Thursday, February 2, 2017 at 9:12:48 AM UTC-5, slide wrote: > > You are checking for != "SUCCESS" and then doing your success > notification. You probably want to swap the stuff inside the blocks. > > On Thu, Feb 2, 2017, 07:08 siva varma Datla <sivava...@gmail.com> wrote: > > I need an email notification for my job status I have groovy syntax for if > condition please let me know if I am doing it wrong. Using this syntax its > only pushing notification when ever my build is successful its not sending > any kind of notifications for failed build. > > node { > > if (result.toString() != "SUCCESS") { > notifySuccessful() > } else { > notifyFailure() > } > > } > > -- > 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-use...@googlegroups.com. > > > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/1f899ca2-9df5-45c3-b96e-0d8684666d3a%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/1f899ca2-9df5-45c3-b96e-0d8684666d3a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > 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/cf6835f7-ca68-4625-94ff-bb4b628ceb31%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/cf6835f7-ca68-4625-94ff-bb4b628ceb31%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAPiUgVcX0Ydpn-7QK7jnpVne37Ut2bgBoy%2BGSxoqKggFc_0Ttw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.