Jenkins provide 'Email-ext' plugin, which allows to configure every aspect of email notifications.
One of my requirement is to send in mail the build package URL, which is already getting displayed in console output.
I found a token
${BUILD_LOG_REGEX, regex, linesBefore, linesAfter, maxMatches, showTruncatedLines, substText, escapeHtml, matchedLineHtmlStyle} - Displays lines from the build log that match the regular expression.
Here is example usage of it
${BUILD_LOG_REGEX, regex="^Build package URL:", showTruncatedLines=false}
This will extract the line starting with "Build package URL:" from the build log and send it through mail.
Do you know how to use this email token "BUILD_LOG_REGEX" in Jelly Script?
ReplyDeleteI mean how to display this extracted logs (from the Jenkins console logs) using Jelly Template... in the email
ReplyDeleteI tried this inside the email subject, without success. IS it not possible?
ReplyDeleteThanks,
Fionn
Hi Siddesh
ReplyDeleteHow do you read outputs from child jobs. My Jenkins job is a wrapper MAIN job which has a bunch of child jobs. So if any of child jobs fail, i can only read the wrapper console output which says failure of the child job. In order to actually find out the true cause, i would have to click on the failed child job to see the actual results
Big big thanks! Saved me tones of time! :)
ReplyDelete