Tuesday, July 23, 2013

Appending HTML file as e-mail in Jenkins/Hudson

You need "Jenkins Email Extension Plugin", which could be installed from Jenkins/Hudson available plugins. Restart is needed.
 You need to fill "Project Recipient List, "Pre-send Script" and correct triggers.

"Pre-send Script"have to be something like this:

def reportPath = build.getWorkspace().child("test.html")
msg.setContent(reportPath.readToString(), "text/html");