问题描述
我有一个詹金斯(Jenkins)建造工作.它具有外壳程序命令部分,在该部分中,我读取了正在构建的当前应用程序的版本".现在,我想在同一shell命令部分中将Jenkins自定义变量"VERSION"设置为"version".我需要将此值作为参数传递给成功构建此作业后触发的其他某些作业.
现在,我将Jenkins变量VERSION传递给其他Job.
请提出我该怎么做.
使用 EnvInject插件将运行时变量注入Jenkins构建过程中,以便您可以在其他构建步骤中使用,也可以将其作为输入参数传递给其他Job.
I have a Jenkins build job. It has section for shell command where I read "version" of the current application that i am building.Now, i want to set the Jenkins custom variable "VERSION" with the "version" in the same shell command section.I need to pass this value as parameter to some other job being triggered after successful build of this job.
Now, I would pass the Jenkins variable VERSION to some other Job.
Please suggest how can I do this.
Use EnvInject Plugin to inject runtime variables into Jenkins build process so that you can use in other build steps or you can pass it on to other Job's as input parameter.
这篇关于如何在Jenkins Shell命令中设置变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!