You're not being too forthcoming with what you want to accomplish, so this may not help you much:
Like it says in the System Groovy Script build step, system Groovy script always executes on the master. The "system Groovy" actually executes inside of Jenkins, in the same vm, so system Groovy can do many of the same things as a plugin can. If you want to run a Groovy script on the slave, you need to use the "Execute Groovy Script" build step and then, if the job is set to execute on a slave, Jenkins will really spawn the Groovy process in the slave. -- Sami Damon G <damon.gabrie...@gmail.com> kirjoitti 16.8.2012 kello 15.22: > Hi There, > I've been playing with the groovy plugin and I'm able to run a few sample > groovy scripts on the master using the system groovy script option in the > job. However I can't seem to get the same code to execute on the slave by > executing a groovy script or by using the scriptler plugin. Even a simple > "println" statement doesn't work. For instance: > > import hudson.model.* > prinln("hello!!!") > > results in: > > Execution of script [test.groovy] failed - Unable to serialize > org.jenkinsci.plugins.scriptler.util.GroovyScript@75f0ab39Build step > 'Scriptler script' marked build as failure > > I get the same thing if I just do prinln("hello!!!") and leave out the import > statement. > > I have groovy installed on the slave but I must be missing something. When I > execute on the slave do I need something additional in my classpath? I didn't > seem to need anything explicit in my classspath to run this as a system > groovy script on the master. > > Does anyone have simple example config to share? I think I must be missing > something fairly basic here. > > Thanks! > > >