-
Bug
-
Resolution: Fixed
-
Major
-
None
In same cases it can happen that env. vars. are not expanded in a consistent way, when some variables are expanded and some aren't.
Reproducer:
-----------
Setup parametrized build with 3 string parameters:
A="aaa"
C="ccc"
B=$A$C
and add shell build step which prints B parameter
echo $B
Output is aaa$C, while one would expect aaaccc (or $A$C).
This is caused by Launcher.inherit() method, which adds variables into resolver and eventually expand them in the same loop (on alphabetically sorted map), thus when expanding $B, $A is already in resolver and gets expanded, while $C is not there yet and thus remains unexpanded.
- is related to
-
JENKINS-20280 Support nested variable expansion
-
- Closed
-
[JENKINS-19488] Inconsistent expansion of env vars
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Link |
New:
This issue is related to |
Workflow | Original: JNJira [ 150940 ] | New: JNJira + In-Review [ 193745 ] |
Code changed in jenkins
User: Vojtech Juranek
Path:
core/src/main/java/hudson/Launcher.java
http://jenkins-ci.org/commit/jenkins/3eea39648943583a530f47f69f93737266537d9d
Log:
[FIXED JENKINS-19488] Expand variable in a consistent way