简体   繁体   中英

Jenkins Gearman plugin configuration groovy

I'm trying to configure Jenkins Gearman plugin using groovy, but can't add the configuration, just get info about existing configuration.

import hudson.plugins.gearman.GearmanPluginConfig
import jenkins.model.GlobalConfiguration

GearmanPluginConfig conf = GlobalConfiguration.all().get(GearmanPluginConfig.class)
conf.getHost()
conf.getPort()

I'm getting info about host and port, how can I set this properties?

Classes which i'm using located here: https://git.openstack.org/cgit/openstack-infra/gearman-plugin/tree/src/main/java/hudson/plugins/gearman/GearmanPluginConfig.java

Thanks for the help!

这里的搜索找到解决方案后: https://github.com/amihura/jenkins-groovy-scripts

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