Re: email-ext - request for another jelly script example

2012-03-24 Thread Chris Withers

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
 }
 return false
}

while(cause != null) {
 upstreamBuild =
hudson.model.Hudson.instance.getItem(cause.upstreamProject).getBuildByNumber(cause.upstreamBuild)
 cause = upstreamBuild.causes.find {
 return (it instanceof hudson.model.Cause.UpstreamCause);
 }
}

Then I check if upstreamBuild is null or not, and if its not, I have
access to its information like this:

def changeSet = upstreamBuild.changeSet

And you can get the info you are looking for from there.


Wow, cool, I'm afraid I'm a bit clueless though...

Where do I put the code you've written above? File on disk or box in UI?
(it either case, where and called what?)

Once I've done that, how do I wire it into the email-ext template?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk


Re: Change svn check-out strategy for automatic/manuel build

2012-03-24 Thread chitech
We found a way around it.

1.0 Make a cron job to modify the config.xml to Clean workspace
1.1 Call reload configuration via disk from cron job
2.0 The hudson run the nightly builds
3.0 Make a cron job to modify the config.xml back to emualte clean
3.1 Call reload configuration via disk from cron job

 

On Thursday, March 22, 2012 1:34:16 PM UTC+1, chitech wrote:

 When an user schedule a build we would like to use svn check-out 
 strategy: 
 ‘Emulate clean checkout by first deleting unversioned/ignored files, 
 then 'svn update'’ 

 But for nightly build we would like to use this strategy: 
 Clean workspace and then checkout 

 We want this because the build time will be shorter in the daytime. 
 Can we 
 somehow achieve this setup?


On Thursday, March 22, 2012 1:34:16 PM UTC+1, chitech wrote:

 When an user schedule a build we would like to use svn check-out 
 strategy: 
 ‘Emulate clean checkout by first deleting unversioned/ignored files, 
 then 'svn update'’ 

 But for nightly build we would like to use this strategy: 
 Clean workspace and then checkout 

 We want this because the build time will be shorter in the daytime. 
 Can we 
 somehow achieve this setup?


On Thursday, March 22, 2012 1:34:16 PM UTC+1, chitech wrote:

 When an user schedule a build we would like to use svn check-out 
 strategy: 
 ‘Emulate clean checkout by first deleting unversioned/ignored files, 
 then 'svn update'’ 

 But for nightly build we would like to use this strategy: 
 Clean workspace and then checkout 

 We want this because the build time will be shorter in the daytime. 
 Can we 
 somehow achieve this setup?


On Thursday, March 22, 2012 1:34:16 PM UTC+1, chitech wrote:

 When an user schedule a build we would like to use svn check-out 
 strategy: 
 ‘Emulate clean checkout by first deleting unversioned/ignored files, 
 then 'svn update'’ 

 But for nightly build we would like to use this strategy: 
 Clean workspace and then checkout 

 We want this because the build time will be shorter in the daytime. 
 Can we 
 somehow achieve this setup?


On Thursday, March 22, 2012 1:34:16 PM UTC+1, chitech wrote:

 When an user schedule a build we would like to use svn check-out 
 strategy: 
 ‘Emulate clean checkout by first deleting unversioned/ignored files, 
 then 'svn update'’ 

 But for nightly build we would like to use this strategy: 
 Clean workspace and then checkout 

 We want this because the build time will be shorter in the daytime. 
 Can we 
 somehow achieve this setup?


On Thursday, March 22, 2012 1:34:16 PM UTC+1, chitech wrote:

 When an user schedule a build we would like to use svn check-out 
 strategy: 
 ‘Emulate clean checkout by first deleting unversioned/ignored files, 
 then 'svn update'’ 

 But for nightly build we would like to use this strategy: 
 Clean workspace and then checkout 

 We want this because the build time will be shorter in the daytime. 
 Can we 
 somehow achieve this setup?