|This plugin comes is not maintained by its owner for Hudson and is made available under the Install-Tested plugin category as described here. If you have any issues with this plugin please mail the Hudson user list and not the owner|
This plugin adds the ability to directly execute Groovy code.
To configure available Groovy installation on your system, go to Hudson configuration page, find section 'Groovy' and fill the form as shown bellow.
To create Groovy-based project, add new free-style project and select "Execute Groovy script" in the Build section, select previously configured Groovy installation and then type your command, or specify your script file name. In the second case path taken is relatively from the project workspace directory.
The plugin also adds the functionality of the Script Console to the project configuration page. You can schedule your system management script...
...and then observe progress in the build log.
Groovy Script vs System Groovy Script
The plain "Groovy Script" is run in a forked JVM, on the slave where the build is run. It's the basically the same as running the "groovy" command and pass in the script.
The system groovy script, OTOH, runs inside the Hudson master's JVM. Thus it will have access to all the internal objects of Hudson, so you can use this to alter the state of Hudson.
The plug-in is being maintained by its owner/maintainers from a new home. Check the Tier info for details of compatibility
Release 1.5 (2010-11-10)
Release 1.4 (2009-12-29)
- Improve error message for missing groovy executable
- Update uses of deprecated APIs
- Added possibility to specify properties and script parameters.
- Added script source choice (file/command) for system groovy scripts.
- Used .exe instead of .bat on Windows (as suggested by Scott Armit).
- Added configuration option for classpath and initial variable bindings for
system groovy scripts.
- Configuring more builders at once actually doesn't absolutely work. If you need more groovy builders in your project, you have to configure them one by one and always save project configuration before you add new one.