How to include pipeline errors in email (Email-ext plugin)

21 views
Skip to first unread message

Faad Sayaou

unread,
Feb 4, 2019, 5:39:18 AM2/4/19
to Jenkins Users

I am trying to have the reason as it is printed on the console of my Jenkins instance why a build failed through email. I did the following

try {
.....

} catch (err) {
cause=err
emailext body:"Error: $cause ",
to: 'mye...@gmail.com'

}

The result on the console is something like "dotnetge command not found" and i will like to have this same type of error through email. This is what i get through email

Error: hudson.AbortException: script returned exit code 127

Björn Pedersen

unread,
Feb 4, 2019, 7:28:12 AM2/4/19
to Jenkins Users
Hi,

you should be ablre to achieve this with the help of the Build Failure Analyzer plugin or the warnings-ng plugin (possibly with a custom groovy parser )

Björn
Reply all
Reply to author
Forward
0 new messages