--
slide-o-blog
http://slide-o-blog.blogspot.com/
${SCRIPT, script="committers.groovy"}
committers.groovy has the following content.
/*************************************************************************************************/
// 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
}
try {
while(cause != null) {
upstreamBuild =
hudson.model.Hudson.instance.getItem(cause.upstreamProject).getBuildByNumber(cause.upstreamBuild)
if(upstreamBuild == null) {
break;
}
cause = upstreamBuild.causes.find {
if(it instanceof hudson.model.Cause.UpstreamCause) {
return true
}
return false
}
}
} catch(e) {
// do nothing
}
// now we loop through the changeset and add all the users to a list
committers = []
if(upstreamBuild != null && upstreamBuild.changeSet != null) {
upstreamBuild.changeSet.each() { cs ->
if(cs.user != null) {
committers.add(cs.user)
}
}
}
committers.unique().join(',')
/************************************************************************************************************/
The last line must evaluate to a string. This requires email-ext 2.15,
but there is a known issue in there with a feature I added, so you may
want to try grabbing the latest github source and compile you own
version (I'm working on getting a release out).
Thanks,
slide
On Fri, Nov 4, 2011 at 7:27 AM, Paolo Di Tommaso
--
slide-o-blog
http://slide-o-blog.blogspot.com/
After doing that you are able to access the changes from the upstream
job via email-ext plugin in the downstream job, f.i:
${CHANGES_SINCE_LAST_SUCCESS, showPaths=true, pathformat="%p"}
HTH
Dirk
2011/11/4 Ferenc Kovacs <tyr...@gmail.com>:
--
Never trust a short-haired guru
> In the "Global Recipient List" in the project setup I have the following:
>
> ${SCRIPT, script="committers.groovy"}
>
> committers.groovy has the following content.
>
> /*************************************************************************************************/
>
> // 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
> }
The above can be simplified to:
def cause = build.causes.find { it instanceof
hudson.model.Cause.UpstreamCause }
Bap.
--
slide-o-blog
http://slide-o-blog.blogspot.com/
Email was triggered for: Failure Sending email for trigger: Failure Sending email to: paolo.ditommaso ERROR: Could not send email as a part of the post-build publishers. javax.mail.SendFailedException: Invalid Addresses;
That setting should still work.