Create your groovy script and place in under your $JENKINS_HOME/email-
templates. Create the email-templates directory if needed.
Say you call it foo.template.
In your jenkins job(s), configure your Editable Email Notification
Content area, like:
${SCRIPT,template=foo.template}
Make sure you
On 24/03/2012 00:48, Slide wrote:
I use something like this in my groovy template
// the goal is to find the top level job which should contain the changelist
def upstreamBuild = null
def cause = build.causes.find {
if(it instanceof hudson.model.Cause.UpstreamCause) {
return true
I use something like this in my groovy template
// the goal is to find the top level job which should contain the changelist
def upstreamBuild = null
def cause = build.causes.find {
if(it instanceof hudson.model.Cause.UpstreamCause) {
return true
}
return false
}
while(cause