You need to use the SCRIPT token and put the script into a file in the
email-templates directory under $JENKINS_HOME.

You can't put groovy directly in the field.

slide


On Tue, Aug 6, 2013 at 12:16 AM, Stijn Deroo-Van Maele <
[email protected]> wrote:

> Hi,
>
> I want to use a groovy script in the email-ext plugin, but when I put this
> in the Default Subject field:
> $DEFAULT_SUBJECT <% def tr = build.testResultAction;  if (tr?.failCount) {
> %>(${tr?.failCount} failures ${tr?.failureDiffString}) <% } %>
>
> In my mail, the groovy code is not interpreted and thus I get following as
> mail subject:
> pr_7315 - Build # 46 - Still Failing! <% def tr = build.testResultAction;
>  if (tr?.failCount) { %>(${tr?.failCount} failures
> ${tr?.failureDiffString}) <% } %>
>
>
> Do I have to install an extra plugin for the groovy code to be interpreted?
>
> Kind regards,
> stijn.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Website: http://earl-of-code.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to