Hi, the groovy script has to be available on all slaves where you execute your jobs under same path. You can use e.g. NFS drive mounted to the same location, another (probably better) way is to keep script in the SCM and checkout it into workspace and there are other ways how to achieve it.
Another possible solution is to use Scriptler plugin [1], which allows you to pre-define a groovy script and then use it (besides others) as a build step in your jobs. Cheers Vojta [1] https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin On Friday 21 September 2012 02:55:16 Reuben Gow wrote: > Hi, > > I've been using system groovy commands in my build steps pretty > successfully for a while. Now that I have larger number of jobs doing the > same commands it would be a good idea to have them all run the same groovy > script file. However I can't figure out how to do that. > > Where does the groovy script need to be stored? I tried putting it at > /tmp/script_name on the master but it wasn't executed when I ran the job. > > Also, variable bindings? my groovy code access things like the current > build and resolves variables etc, do I need to something with the variable > bindings box in order to get the same functionality from a script? > > Thanks
