[英]Jenkins - transfer master to slave parameter in multi-configuration parameterized job
I want to configure Jenkins as follows 我想按以下方式配置Jenkins
I face the following problem. 我面临以下问题。 On the master, the compilation script finds the VERSION variable and everything runs fine.
在主服务器上,编译脚本找到VERSION变量,一切运行正常。 On the slave, the VERSION variable does not exist and the script fails.
在从属服务器上,VERSION变量不存在,脚本失败。 I run a python script and I get variables through the os.environ(), but the problem is that the VERSION variable does not seem to be transferred from the master environment to the slave.
我运行python脚本,并通过os.environ()获取变量,但是问题是VERSION变量似乎没有从主环境转移到从环境。 In fact, also a "set" command with a shell shows that the variable does not exist under Windows slave.
实际上,带有外壳程序的“ set”命令也表明该变量在Windows从站下不存在。
I found some hints that Jenkins EnvInject plugin should solve my problems. 我发现Jenkins EnvInject插件应该可以解决我的问题。 However, I did not manage to configure it properly.
但是,我没有设法正确配置它。
May you help me? 你能帮我吗?
Thanks in advance! 提前致谢!
Maybe you can try the Parameterized Trigger Plugin to transport parameters between your projects. 也许您可以尝试使用参数化触发器插件在项目之间传输参数。 But I am not sure that works or not under your enviroment.
但是我不确定在您的环境下该方法是否可行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.