aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2018-08-21 22:49:27 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2018-08-21 22:49:27 -0400
commit74c85b6ac088f067fd5806a492789b08d2ec283f (patch)
treeed9058d67da31c8d9edd7e06d1fccf888915d513
parent9e27561a5ac7eab6893a7cbacc68977ab6cb4abb (diff)
downloadjscu_refactor-purge-before-unstash.tar.gz
Purge workspace before unstashingpurge-before-unstash
-rw-r--r--vars/utils.groovy4
1 files changed, 4 insertions, 0 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy
index f955d67..c361eb6 100644
--- a/vars/utils.groovy
+++ b/vars/utils.groovy
@@ -135,6 +135,10 @@ def run(configs, concurrent = true) {
}
withEnv(runtime) {
stage("Build (${myconfig.name})") {
+ // When running on a real system Jenkins leaves behind a populated
+ // 'job@#' workspace directory. It needs to be purged for unstash
+ // to be successful.
+ deleteDir()
unstash "source_tree"
for (cmd in myconfig.build_cmds) {
sh(script: cmd)