diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2018-12-21 21:30:52 +0300 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2018-12-21 21:30:52 +0300 |
commit | 38a10e387021024e35d1985aebe3d50591d9a6c9 (patch) | |
tree | ed2184541bdedb961bb0b61bf04d1351c307a675 | |
parent | a9049532a271117983430d2d80b8ad61879ecf7a (diff) |
Exit as error if job fails
If a script is waiting for a job to be done and that job fails,
exit with an error status so that the script doesn't continue
with a prerequisite in an invalid state.
-rwxr-xr-x | scripts/review_apps/review-apps.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh index 9e52366f800..118a7c7f638 100755 --- a/scripts/review_apps/review-apps.sh +++ b/scripts/review_apps/review-apps.sh @@ -344,6 +344,7 @@ function wait_for_job_to_be_done() { if [[ "${job_status}" == "failed" ]]; then echo "The '${job_name}' failed." + exit 1 elif [[ "${job_status}" == "manual" ]]; then echo "The '${job_name}' is manual." else |