[英]how read active choices parameter value in another active chocices parameter's groovy script in jenkins?
In a Jenkins build I created two "Active Choices Reactive Reference Parameter" (input text boxes) those are PARAMETER1 and PARAMETER2. 在Jenkins构建中,我创建了两个“主动选择反应式参考参数”(输入文本框),分别是PARAMETER1和PARAMETER2。 I can use contains() call in PARAMETER2's groovy script as below 我可以在PARAMETER2的groovy脚本中使用contains()调用,如下所示
PARAMETER1.contains("some string")
but I could not find a way to read PARAMTER1's exact value. 但我找不到读取PARAMTER1确切值的方法。
I am very new ing groovy and do not have understanding of Java. 我是新手,对Java不了解。
How can I set use PARAMETER1 to a string in PARAMETER2's groovy script? 如何将PARAMETER1设置为PARAMETER2的groovy脚本中的字符串?
The PARAMETER1 variable gets injected into your PARAMETER2 Groovy script, as a variable. PARAMETER1变量作为变量注入到PARAMETER2 Groovy脚本中。
It means that you can call it just like a normal variable. 这意味着您可以像普通变量一样调用它。 For example. 例如。
return [PARAMETER1+'ou', PARAMETER1+'AA', PARAMETER1+'11', ]
That will return the value of PARAMETER1 concatenated with some other string. 这将返回与其他字符串串联的PARAMETER1的值。
Hope that helps, Bruno 希望能有所帮助,布鲁诺
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.