-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Critical
-
Component/s: envinject-plugin, workflow-job-plugin
On Freestyle jobs defining a Jenkins global variable like this would work as expected:
XDG_CACHE_HOME=${HOME}/.cache/${EXECUTOR_NUMBER}
Note: behavior is the same regardless if brackets are used or not when you define the variables.
Â
Freestyle "set" result (correct):
XDG_CACHE_HOME=/home/builder/.cache/2
Pipeline "set" result (incorrect):
XDG_CACHE_HOME=${HOME}/.cache/${EXECUTOR_NUMBER}
Â
This problem is essential because it prevents Jenkins administrators from using environment variables to fix/workaround execution problems.Â
Effectively this breaks any job that needs to define variables that are relative to something else, like workspace, home, ....