import hudson.model.Run;
import hudson.model.listeners.RunListener;
import hudson.Extension;
@Extension
public class DeleteListener extends RunListener<Run> {
@Override
void onDeleted(Run r) {
println(r.getNumber())
}
}
Groovy script failed:
org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: DeleteListener.main() is applicable for argument types: ([Ljava.lang.String;) values: [[]]
Possible solutions: wait(), wait(long), all(), any(), find(), wait(long, int)
I think this is a matter of context. That has to be like a "system" groovy script.
Also, if that doesn't work, you should probably just create a plugin. You have already written what you need, and that will let you manage it cleanlier (writing tests, versioning…).
Cheers
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/832ce598-477c-4fcf-ae79-4107ee2373d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.