[英]Parameterized build passing to downstream projects via jenkins pipeline
I am having a parameterized build of choice
and string
parameters.我有一个
choice
和string
参数的参数化构建。 How can I pass them to a downstream project?如何将它们传递给下游项目? I tried but it is not working.
我试过了,但它不工作。 Below is my code.
下面是我的代码。 Also, is there a way to hide this from
Stage
view?另外,有没有办法从
Stage
视图中隐藏它?
stage("Downstream Projects") {
steps {
build job: 'Projetct-2', parameters: [string(name: 'to_where', value: '${To_Where}'), string(name: 'version_no', value: '${Version_No}'), string(name: 'artifact_version', value: '${Artifact_Version}')], wait: false
}
}
The parameters are exposed as environment variables and can be accessed as follows in your case:这些参数作为环境变量公开,在您的情况下可以按如下方式访问:
string(name: 'to_where', value: env.To_Where)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.