Commit 38a10e38 authored by Mark Lapierre's avatar Mark Lapierre

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.
parent a9049532
...@@ -344,6 +344,7 @@ function wait_for_job_to_be_done() { ...@@ -344,6 +344,7 @@ function wait_for_job_to_be_done() {
if [[ "${job_status}" == "failed" ]]; then if [[ "${job_status}" == "failed" ]]; then
echo "The '${job_name}' failed." echo "The '${job_name}' failed."
exit 1
elif [[ "${job_status}" == "manual" ]]; then elif [[ "${job_status}" == "manual" ]]; then
echo "The '${job_name}' is manual." echo "The '${job_name}' is manual."
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment