简体   繁体   English

在从属节点上运行groovy脚本

[英]Running groovy script on slave nodes

How do we configure running groovy scripts on slave nodes? 我们如何在从属节点上配置正在运行的Groovy脚本? am able to get groovy installation from manage jenkins section, but the scripts fail to run. 能够从manage jenkins部分获得常规安装,但是脚本无法运行。

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 System groovy选项不适合,因为它在主服务器上运行,并且在配置为在slave上运行的作业上执行groovy失败,并显示错误

/workspace/hudson5188055044238549912.groovy: 2: unable to resolve class jenkins.model.Jenkins @ line 2, column 1. import jenkins.model.Jenkins /workspace/hudson5188055044238549912.groovy:2:无法解析类jenkins.model.Jenkins @第2行,第1列。导入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?? 有没有简单的设置方法,或者需要哪些詹金斯和Groovy罐子?

On the job configuration page there should be a drop down beside "Groovy Version" under the "Execute Groovy Script" block. 在作业配置页面上,“执行Groovy脚本”(Execute Groovy Script)块下的“ Groovy Version”旁边应有一个下拉菜单。 You need to select the name of the groovy install that is on master. 您需要选择主服务器上的groovy安装的名称。 Jenkins will grab the necessary files from master. 詹金斯将从主那里获取必要的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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