diff options
| author | Matt Rendina <mrendina@stsci.edu> | 2017-11-29 09:01:46 -0500 |
|---|---|---|
| committer | Matt Rendina <mrendina@stsci.edu> | 2017-11-29 09:01:46 -0500 |
| commit | a9a02f98260067d199cfc7d01966be76c43c0ec8 (patch) | |
| tree | fd2eb1c13443b63d991d35ec7d82d89b91520412 /vars/utils.groovy | |
| parent | 8b2a3d0fd173cb48f98ac69fea25907de7c35b49 (diff) | |
| download | jscu_refactor-a9a02f98260067d199cfc7d01966be76c43c0ec8.tar.gz | |
Streamline and add env var debugging output
Diffstat (limited to 'vars/utils.groovy')
| -rw-r--r-- | vars/utils.groovy | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy index 8860227..c805640 100644 --- a/vars/utils.groovy +++ b/vars/utils.groovy @@ -38,27 +38,30 @@ def concurrent(configs) { myconfig = config.copy() tasks["${config.nodetype}/${config.build_mode}"] = { node(config.nodetype) { + // FIXME: Generalize env vars. myconfig.env_vars.add("PATH=./_install/bin:${env.PATH}") + for (var in myconfig.env_vars) { + println(var) + } withEnv(myconfig.env_vars) { println("task: myconfig.nodetype = ${myconfig.nodetype}") println("task: myconfig.build_mode = ${myconfig.build_mode}") println("task: myconfig.env_vars = ${myconfig.env_vars}") - println("task: myconfig.build_args = ${myconfig.build_args}") println("task: myconfig.build_cmds = ${myconfig.build_cmds}") + println("task: myconfig.test_cmds = ${myconfig.test_cmds}") println("task: myconfig.run_tests = ${myconfig.run_tests}") - def prefix = pwd() + "/_install" stage("Build (${myconfig.build_mode})") { unstash "source_tree" for (cmd in myconfig.build_cmds) { sh(script: cmd) } } - if (myconfig.run_tests) { + if (myconfig.test_cmds.size() > 0) { try { stage("Test (${myconfig.build_mode})") { - for (cmd in myconfig.test_cmds) { - sh(script: cmd) - } + for (cmd in myconfig.test_cmds) { + sh(script: cmd) + } } } finally { |
