Closed Jimilian closed 8 years ago
Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.
@nickgrealy, is it ok for you?
Yep. Had a look last night, looks simple and clean. Nice!
Want me to merge and publish a new version?
Yes, it would be great!
Tomorrow I'm going to add new feature -> add paths for classloader. It will make possible importing groovy classes from disk. Right now we are using workaround:
this.getClass().getClassLoader().addClasspath('/var/lib/jenkins/groovy_scripts/');
this.getClass().getClassLoader().loadClass("com.companyname.ClassName");
def coolStats = new com.companyname.ClassName(run); // This line starts to work only after success execution of previous one
But it's not very user-friendly. So, I decided to add one extra field for advanced users -> classPaths and force plugin to load this classes to plugin.
Now it's possible to setup plugin to execute script every minute (or less frequently). It's quite useful if you want to push queue size, executors load or something like that from Jenkins.