summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-03-01 14:44:07 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-03-06 12:42:07 +0000
commit22f96d2f384c65231f7e6be093dee2cd8eee7c8b (patch)
treece390ebe3008af58c57f2c29966b4d76e5b7cb49
parentacd4dfe5cbee22fee97c40afb0a3a2df6722e96a (diff)
jenkins-helpers.sh: Don't touch step's artifacts directory unnecessarily
Change-Id: I00df2aaa065377884b60360060ed2234e6555e3a
-rw-r--r--jenkins-helpers.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index 8f406820..0303cfb5 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -1104,11 +1104,6 @@ run_step ()
run_step_active=true
fi
- run_step_artifacts=$run_step_top_artifacts/$(printf "%02d" $run_step_count)-$pretty_step
-
- rm -rf "$run_step_artifacts"
- mkdir -p "$run_step_artifacts"
-
if $run_step_active; then
local skip=false
case "$run_step_status:$run_mode" in
@@ -1129,6 +1124,11 @@ run_step ()
esac
if ! $skip; then
+ run_step_artifacts=$run_step_top_artifacts/$(printf "%02d" $run_step_count)-$pretty_step
+
+ rm -rf "$run_step_artifacts"
+ mkdir -p "$run_step_artifacts"
+
echo "RUNNING ${step[@]}; see tail -f $run_step_artifacts/console.log"
run_step_status=0
eval "if $run_step_verbose; then set -x; else set +x; fi; ${step[@]}" 2>&1 | tee -a $run_step_top_artifacts/console.log > $run_step_artifacts/console.log &