From 21cb97b04552ac9e8a26392f811e24ab23e937eb Mon Sep 17 00:00:00 2001 From: Prathamesh Kulkarni Date: Thu, 14 Feb 2019 16:25:52 +0530 Subject: 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 --- jenkins-helpers.sh | 1 + 1 file changed, 1 insertion(+) 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=$? -- cgit v1.2.3