更新时间:2023-12-05 18:03:46
您可以像这样获取全局属性:
You can get global properties like this:
import jenkins.model.Jenkins
def envVars = Jenkins.instance.getGlobalNodeProperties()[0].getEnvVars()
println envVars['myVar']
我参考了下面的链接,了解如何以编程方式设置全局属性.https://groups.google.com/forum/#!topic/jenkinsci-users/KgCGuDmED1Q
I referred to the link below, about how to set global properties programatically. https://groups.google.com/forum/#!topic/jenkinsci-users/KgCGuDmED1Q