-
New Feature
-
Resolution: Fixed
-
Minor
-
None
Promotion is an independent job type, which has its own environment. Several promotion-oriented build steps may need an environment or artifacts of the original builds, so they may call the TokenMacro resolution against the build.
In particular cases we're interested to support environment variables from both Promotion and original build. In such case it would be great to have a PROMOTION_ENV macro, which finds the source promotion job by the current executor context. In such case ENV and PROMOTION_ENV macros will allow to extract variables from both jobs.
- is related to
-
JENKINS-38213 PROMOTION_ENV return env vars for the promotion environment not from the source of the promotion
-
- Open
-
Code changed in jenkins
User: Oleg Nenashev
Path:
pom.xml
src/main/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacro.java
src/main/resources/hudson/plugins/promoted_builds/tokenmacro/help.jelly
src/test/java/hudson/plugins/promoted_builds/tokenmacro/PromotedEnvVarTokenMacroTest.java
http://jenkins-ci.org/commit/promoted-builds-plugin/3c38412146343a41909ff15cbfc1f91efb0c6a31
Log:
[FIXED JENKINS-30411] - Add the PROMOTION_ENV token macro
Promotion is an independent job type, which has its own environment. Several promotion-oriented build steps may need an environment or artifacts of the original builds, so they may call the TokenMacro resolution against the build.
In particular cases we're interested to support environment variables from both Promotion and original build. In such case it would be great to have a PROMOTION_ENV macro, which finds the source promotion job by the current executor context. In such case ENV and PROMOTION_ENV macros will allow to extract variables from both jobs.