4
votes

My project has just integrated Jenkins as its CI server. We would love to use the Email-ext plugin to provide a customized email that gives our developers a reasonable overview of various metrics once a build is complete.

The example screenshot given on the Email-ext plugin site its more or less what we are looking for.

We generate currently generate metrics for Findbugs, Cobertura code coverage and TestNG. I'm having difficulty finding good examples of how these metrics might be included in a Jelly script.

Does anyone have a similar script or have a link to some good example/tutorial of linking these metrics into Email-ext notifications.

Thanks

2
Switch to the Groovy scripts and then just write Java. Do you have Java code on how you use Findbugs, etc. ?Josh Unger

2 Answers

4
votes

Have you looked at $JENKINS_HOME/plugins/email-ext/WEB-INF/classes/hudson/plugins/emailext/templates/html.jelly ? If that isn't sufficient, let me know what additional information you're trying to find and I'll see if I can help.

1
votes

The 2016 docs for Email-Ext [1] say to look on github for the sample jelly files. Once one installs email-ext into one's jenkins instance, the template files are located inside the jar, which is much less inconvenient for viewing than using the repository.

The default HTML Jelly template is available on the web [2] as is the list of all the built-in templates, in the ...resources...templates folder [3].

[1] Docs: https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin#Email-extplugin-Globalconfiguration

[x] The regular default HTML template: https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/resources/hudson/plugins/emailext/templates/html.jelly

[3] All templates: https://github.com/jenkinsci/email-ext-plugin/tree/master/src/main/resources/hudson/plugins/emailext/templates