Reputation: 107
How do we configure running groovy scripts on slave nodes? am able to get groovy installation from manage jenkins section, but the scripts fail to run.
I am having a job with execute groovy steps and this job is supposed to run on "slave" nodes.
The System groovy option wont fit since it runs on master and the execute groovy on job configured to run on slave fails with error
/workspace/hudson5188055044238549912.groovy: 2: unable to resolve class jenkins.model.Jenkins @ line 2, column 1. import jenkins.model.Jenkins
Seems the jars are not picked during run. Is there easy way to setup or which jenkins and groovy jars are required??
Upvotes: 1
Views: 2591
Reputation: 3110
On the job configuration page there should be a drop down beside "Groovy Version" under the "Execute Groovy Script" block. You need to select the name of the groovy install that is on master. Jenkins will grab the necessary files from master.
Upvotes: 1