My Jenkins build produces a HTML file. I want to include this file in the HTML output of my jelly script via the Jenkins email-ext plugin.
I saw this answer in an old post but, as one person wrote, it only print the file path and not the content
If the file is included in the workspace of the job, declare your variable such as:
<j:set var="fileContent" value="${build.getWorkspace().child("results.html")}"/>
And call it this way:
${fileContent}
Perhaps I found my own answer. This works for me:
Without the .readToString() method I only got the file path returned.