How to insert external data in the Jenkins email report?
Question
Is it possible to pass data generated by the script executed in the 'Execute shell' build step and insert it into the email report. I'm using the email-ext plugin and a Jelly template.
Solution
Use EnvInject plugin to propagate your variables "to the outside". Here is how you can do it.
OTHER TIPS
I use groovy-based email template. See below what I've found. Maybe it will be helpful in Jelly templates as well:
<%
import hudson.model.*
def YOUR_VARIABLE= build.getEnvVars()["SOME_BUILD_PARAMETER"];
%>
Then you can use
${YOUR_VARIABLE}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow