summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2019-02-14 16:25:52 +0530
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-02-14 11:59:10 +0000
commit21cb97b04552ac9e8a26392f811e24ab23e937eb (patch)
tree551857c5edc5f25dbfa2b8d1bb1b626b67dbe215
parent682ba051f0bdbcc628155aaab268c19d0d3d2952 (diff)
Set run_step_status to 0 before running step.
run_step_status is set to exit status of step only if it fails, else it holds the value of exit status of previous step. Avoid that by initializing it to 0. Change-Id: I1e7625ffc22ad2a44470892b11092e80f2b52eae
-rw-r--r--jenkins-helpers.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index d6b1e9ae..03c3a51a 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -1135,6 +1135,7 @@ run_step ()
if ! $skip; then
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 &
wait $! || run_step_status=$?