Thanks for your answer.

I’m beginning to think that pipeline scripting is too difficult.  It seems to 
me that there aren’t enough complete examples to demonstrate this stuff.  The 
snippets generator does not help with putting a complete script together.

Jenkins seems to have gone from being very user friendly to difficult ☹

From: [email protected] 
[mailto:[email protected]] On Behalf Of [email protected]
Sent: 24 April 2017 17:13
To: Jenkins Users <[email protected]>
Cc: David Aldrich <[email protected]>
Subject: Re: How to use email-ext plugin in pipeline script?

You can check the currentBuild status just before sending the email:

currentBuild.result

If empty it mean nothing have set it to warning or error yet. you can set it to 
success
if(!currentBuild.result)
{
  currentBuild.result = 'SUCCESS'
}

or you could set it directly into the email without touching the 
currentBuild.result variable or use another variables into a custom template.

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/dd403b4e-dd28-484b-9c7e-3f8342e6faa6%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/dd403b4e-dd28-484b-9c7e-3f8342e6faa6%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


Click 
here<https://www.mailcontrol.com/sr/L+2l27a2kTrGX2PQPOmvUgTs32qy68qNUVJKfAczjM2APaRp+v6dvCYeKwmTQzqndWPgeKwmJJwJwVIOzJj0SQ==>
 to report this email as spam.

-- 
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/867d39cd53494612b471bc5238f31d16%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.

Reply via email to