0
votes

After a build is finished I use the mail-ext-plugin (Jenkins Email Extension Plugin) to send an email to certain users. I would like to include the user who started (requested) the build in that email. I have tried the suggestion here however, that didn't seem to work I just got this error.

Error in script or template: groovy.lang.MissingPropertyException: No such property: CAUSE for class: SimpleTemplateScript4
1

1 Answers

1
votes

After much searching I found a page on jelly usage on the Jenkins wiki (here). There is a link on this page which contains all the useable classes. I was able to find the cause class and used this great example to help me implement it in my code. I added

<%
    for (hudson.model.Cause cause : build.causes) {
%>
        ${cause.shortDescription}
<%
    }
%>

which produced -

Started by user Matthew Armstrong