aboutsummaryrefslogtreecommitdiff
path: root/vars
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2019-06-26 15:41:02 -0400
committerGitHub <noreply@github.com>2019-06-26 15:41:02 -0400
commit0576b7bcd04327acb3d082a71f7aaf5fef484488 (patch)
tree6e9047332b09a2df4ce6b74274338bd1ba0d17ac /vars
parent7f123b810c6b49498b14e01029d06e8b5e6ac839 (diff)
downloadjscu_refactor-0576b7bcd04327acb3d082a71f7aaf5fef484488.tar.gz
Override value of HOME to be the job's workspace root dir. (#56)1.3.19
* Set HOME to be workspace root before setting other env vars. * Expand self-testing Jenkinsfile to include HOME override checking.
Diffstat (limited to 'vars')
-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) {