如何向"readProperties file"添加其他属性?



如何将key=value对注入到使用读取属性读取的属性?

...
props = readProperties file: "$parametersFile"
fileParams = props.collect { string(name: it.key, value: it.value) }
build job: "anotherjobName", parameters: fileParams // good, passes parameters read from $parametersFile
fileParams.inject(["EXTRA_PARAM=xparam_value"]) // Is there a way to inject the additional parameter to fileParams, something like this?
build job: "yetAnotherjobName", parameters: fileParams

我可以按如下方式进行操作:

xParam = [ $class: 'StringParameterValue','name': 'EXTRA_PARAM', 'value': "xparam_value" ]
build job: "yetAnotherjobName", parameters: fileParams + xParam

相关内容

  • 没有找到相关文章

最新更新