aboutsummaryrefslogtreecommitdiff
path: root/vars/utils.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'vars/utils.groovy')
-rw-r--r--vars/utils.groovy4
1 files changed, 4 insertions, 0 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy
index 57c9ef6..b7e2d3e 100644
--- a/vars/utils.groovy
+++ b/vars/utils.groovy
@@ -622,6 +622,10 @@ def expandEnvVars(config) {
// Expand environment variable specifications by using the shell
// to dereference any var references and then render the entire
// value as a canonical path.
+
+ // Override the HOME dir to be the job workspace.
+ config.env_vars.add("HOME=${env.WORKSPACE}")
+
for (var in config.env_vars) {
// Process each var in an environment defined by all the prior vars.
withEnv(config.runtime) {