简体   繁体   中英

Running groovy script on slave nodes

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??

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM