2

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.

ddario
  • 1,015
  • 3
  • 12
  • 25
  • I tried setting an env variable in the shell script, and then reading it inside the jelly script with buildenv.get function, but it seems script generated variables are not accessible from jelly. – ddario May 22 '12 at 14:44

2 Answers2

1

Use EnvInject plugin to propagate your variables "to the outside". Here is how you can do it.

Community
  • 1
  • 1
malenkiy_scot
  • 16,415
  • 6
  • 64
  • 87
0

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}
Sergey Bondarev
  • 410
  • 4
  • 7