Trouble emailing warnings (Jenkins Email Extension Plugin + Warnings ng Plugin) - jenkins

I would like to email a table/data from the Jenkins Warning Next Generation Plugin, but wasn't able to figure it out. I've tried looking at the documentation for Warning Plugin and Email Extension, but wasn't sure what to do next. How could I access the variables/data in the email plugin? Is there some variable I can access like this: ${some_variable} or $SOME_VARIABLE in the "Editable Email Notification" panel? If possible, I'd like to get html from the Warnings plugin so I can display it in the email.

Related

Sending robot framework log file as email content via Jenkins is not getting displayed

I have created a Jenkins job to execute robot framework. The results[log.html and report.html] of the Jenkins are getting displayed properly.
Now I am using the email-ext plugin to send the log file as email content to the specified group of users, but the received email doesn't display the content and shows error as "Opening Robot Framework log failed" in the email.
I have set the email-ext plugin as follows:
I wish to send the robot results as email content, not as an attachment, I have tried various methods like Linux, shell scripting etc, but still, it doesn't work. How can the log.html email content can be sent to the email body?
You will not be able to just put the entire content of the robot log.html in an email because it contains javascript.
I've been looking into this the last few days as well and have come to see that using a groovy based template using the jenkins Email-ext plugin is the way to go. Googling for 'jenkins robot framework email template' shows a few hits and one that I'm planning to try and then modify to my liking was this one:
https://github.com/vladwa/robot-email-template
From this I found that we don't have access to all of the test info built in, so I wrote up some modifications to load the robot output.xml as an artifact to then be able to inject any data in that file into the html email report. Here's the gist of that:
https://gist.github.com/harbdog/070f0be66ebae343d6d11e57a6c6fc08
Here's what it looks like for example:
You have to configure publish robot framework test result <post build> and then use {ROBOT_REPORTLINK} in email content section

Jenkins email-ext plugin "ghost" configuration issue

We have an old install of Hudson (ver. 1.379, yes that old...) that hasn't been upgraded yet (and I am not quite sure when and if it will be by the people responsible for it).
There seems to be some place, apparently unaccessible from the web interface, were additional recipients for the email-ext plugin were added...
Problem is, those recipients no longer exist and quite a few people (mostly unrelated to the people who use Hudson) get spammed by bounces from those emails...
For email-ext I get this in the plugin page:
version: 2.12 installed: 2.8
I have looked at the configs and I believe email-ext config should be under "Editable Email Notification" of that job...
I see some of the recipients of those emails but not the person who left, it looks like this was configured elsewhere, maybe manually in some sort of config file.
Where can I look for this?
Thank you!
Puzzled!
There is global configuration. Go to Manage Hudson, then Configure System (the wording my be different based on your version, but you should end up here http://<hudsonurl>/configure. You need to have global administrative permissions to access this, but based on what you are saying, it sound like you do not.
Based on your version of the plugin, under Extended E-mail Notification, you will see Default Recipients. Older versions of the plugin did not have that feature.
Also, under the job configuration itself, there are several places to override/add to the list of recipients, the most buried of which is under the Triggers
Click Advanced... button under Editable Email Notification
For each trigger, click Expand link.
Lastly, it is possible that people are included on the emails cause they were Culprits. In Hudson's terms, these are people who committed to SCM since the last successful build. If the build has been failing since then for a long time, they are just there as culprits. The only way to "reset" the culprits is to let the job build successfully

Jenkins/hudson email-ext plugin - "committers" option not visible

I'm trying to use the Jenkins email-ext plugin (Editable Email Notification) to notify a committer if they've broken a build.
This can apparently be done by adding a post build action to a project, choosing "Editable Email Notification", and then selecting a committers checkbox.... but I can't seem to find this checkbox!
If you look at my screenshot below you can see that there is no option for just committers, and I can only see "Recipient list", "Developers", or "Requestor", and only when I add an extra trigger.
Does anyone have any suggestions as to how to get this option? Am I missing another plugin that is required (I've got the Subversion Plug-in) or something?
Email ext plugin is v2.32 (the latest) and Jenkins is v1.528 (nearly the latest).
There is no option as "committers" we have only the option to chose between developers or to opt for a trigger for success or failure to a requestors or to list of people in the recipients list

How to have output of script emailed from Jenkins?

I am setting up a Jenkins job that processes some data.
Once the job is finished, I would like to have jenkins run a script that describes the status of the recent processing and email the stdout of that script to a specified email address.
While I realize that it is possible to have the script send the email itself, I am wondering if there exists a more ideal way to have Jenkins send the output of that script. Is there a plugin that is idea for this?
Thanks.
To configure the Email-ext plugin:
To get a portion of the log in the mail, if not all, set the 'Extended E-mail Notification' to send an email for each build that failed, and use the $BUILD_LOG in the body of the message:
In the body of the message (below the '$DEFAULT_CONTENT' ) add the parameter $BUILD_LOG to display the end of the build log
Assuming the log is in plain-text, change 'Content Type' to Plain Text
For the list of built-in Jenkins parameters, go to this page:
http://[your-jenkins-server]/env-vars.html
Cheers
EDIT:
To get to that list of available env-vars via the UI,
there is a link at the Execute shell build-step, for example -
I'm not sure if this is exactly what you're looking for, but the Email-ext plugin for Jenkins sounds like it may do what you want.

Jenkins Email-ext plugin - tokens

Hi I'm using Jenkins Email-ext plugin.
Where can I find a list of all the things I can refer to in the html content of the email?
For instance: I recently found out that you can put parameters values inside the mail using:
${ENV,var="variable_name"}
But say that I want to get build log or build number or build status (passed fail).
Do you know if there is a document listing all data that is referable in this plugin.
Thanks!!
On job configurations page:
Check 'Editable Email Notification' box -> find 'Content Token Reference' (it's between 'Attachments' and 'Trigger for matrix projects') -> Click on ? to the right side of it.

Resources