How to pass parameters from one job to another in jenkins 2.x?

时间:2016-07-11 20:43:17

标签: jenkins

Many of my jobs seem to have broken due to:

https://issues.jenkins-ci.org/browse/JENKINS-34873

All I want to do is pass along a version and an environment:

MY_VER=0.1.0
MY_ENV=STAGE

I've tested by adding variables to a properties_file, by hard-coding variables, and by any other way I can think of, but I still can't pass a simple variable.

All debian packages and jenkins plugins are up to date ubuntu version: Linux my-box 4.2.0-41-generic #48~14.04.1-Ubuntu SMP Fri Jun 24 17:09:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

jenkins version: 2.13

enter image description here enter image description here

1 个答案:

答案 0 :(得分:-1)

您可以在当前作业中将属性文件创建为工件。 将另一个作业中的相同属性文件作为环境变量注入。