Re: Warnings Plugin and Mail-ext Integration

2012-04-12 Thread Slide
I'm having a few difficulties on this. The GroovyShell is initialized with a ClassLoader like this: private static final class Script implements DelegatingCallableString,RuntimeException { private final String script; private transient ClassLoader cl; private

Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Darren Syzling
Regarding the Warnings plugin - is there anyway I can access warning information for the current build from a mail-ext groovy template by using the hudson/jenkins model API? Or would I use the token macro expansion plugin in some way? I was wondering if there was a documented way of gaining access

Re: Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Ullrich Hafner
I haven't yet done that but it should be possible to access the objects using this method from your script: WarningsResultAction action = getAction(hudson.plugins.warnings.WarningsResultAction) From this object you get the result using action.getResult() Maybe we can work together on making an

Re: Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Darren Syzling
Ulli, I'd be happy to work on something together. I did however try a few variants but the hudson.plugins.warnings.WarningsResultAction class could not be found, I tried variants of this: warningsResultAction = build.getAction(Class.forName(hudson.plugins.warnings.WarningsResultAction))

Re: Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Slide
I hope you mean email-ext 2.19. There is nothing different about the groovy implementation in email-ext, it uses the same one as the rest of Jenkins. On Apr 11, 2012 5:57 AM, Darren Syzling dsyzl...@gmail.com wrote: Ulli, I'd be happy to work on something together. I did however try a few

Re: Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Darren Syzling
Yes sorry email-ext 2.19 installed. On 11 April 2012 14:05, Slide slide.o@gmail.com wrote: I hope you mean email-ext 2.19. There is nothing different about the groovy implementation in email-ext, it uses the same one as the rest of Jenkins. On Apr 11, 2012 5:57 AM, Darren Syzling

Re: Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Ullrich Hafner
Hmm, that is strange. Classloading should be straight forward. Seems that the installation is corrupt. Is the warnings plug-in showing up in Jenkins? Ulli On 04/11/2012 02:57 PM, Darren Syzling wrote: Ulli, I'd be happy to work on something together. I did however try a few variants but the

Re: Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Ullrich Hafner
When I execute the following in Jenkins script console I correctly find the action of a build: println(hudson.model.Hudson.instance.getItem(Your Job Name).getLastBuild().getAction(hudson.plugins.warnings.WarningsResultAction.class)) BTW: Maybe we can discuss this topic in our IRC channel then we

Re: Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Slide
I also can't seem to get the groovy template to load the WarningsResultAction class. I tried similar things to what you did below. I will see if I can figure out what this is the case. Thanks, slide On Wed, Apr 11, 2012 at 5:57 AM, Darren Syzling dsyzl...@gmail.com wrote: Ulli, I'd be happy

Re: Warnings Plugin and Mail-ext Integration

2012-04-11 Thread Slide
Ok, it looks like the groovy script console sets the classloader for the context to Jenkins.getInstance().getPluginManager().uberClassLoader, which the email-ext plugin does NOT do. I will look at updating this and trying it out and if it works, I'll release a new version of email-ext. slide On