From 0576b7bcd04327acb3d082a71f7aaf5fef484488 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Wed, 26 Jun 2019 15:41:02 -0400 Subject: Override value of HOME to be the job's workspace root dir. (#56) * Set HOME to be workspace root before setting other env vars. * Expand self-testing Jenkinsfile to include HOME override checking. --- Jenkinsfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index 25758ae..0ebbf0f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -//@Library('utils@ymlfix') _ +//@Library('utils@homedir') _ // [skip ci] and [ci skip] have no effect here. if (utils.scm_checkout(['skip_disable':true])) return @@ -35,7 +35,10 @@ bc0.env_vars = ['VAR_ONE=1', bc0.conda_ver = '4.6.4' bc0.conda_packages = ['python=3.6', 'pytest'] -bc0.build_cmds = ["date", +bc0.build_cmds = ["env", + "ls -al ..", // Workspace root. + "ls -al", // Project clone dir. + "conda config --show", "./access_env_var.sh", "which python", "conda install ipython"] @@ -53,8 +56,10 @@ bc1.test_cmds[1] = "${PYTEST} tests/test_25pass.py" bc2 = utils.copy(bc0) bc2.name = 'Third build config' bc2.conda_packages = ['python=3.6'] -bc2.build_cmds = ["which python"] -bc2.test_cmds = ["ls -al"] +bc2.build_cmds = ["env", + "which python"] +bc2.test_cmds = ["ls -al ..", // Workspace root. + "ls -al"] // Project clone dir. bc2.test_configs = [] -- cgit