Docker: Prevent crash looping

This commit is contained in:
Ole Schütt 2019-04-06 13:52:16 +02:00 committed by Ole Schütt
parent dd6be25fbc
commit 402e0699ef

View file

@ -40,7 +40,7 @@ function upload_final_report {
function error_handler {
echo -e "\nSummary: Something went wrong.\nStatus: FAILED" | tee -a $REPORT
upload_final_report
exit 1
exit 0 # prevent crash looping
}
trap error_handler ERR
@ -48,7 +48,7 @@ trap error_handler ERR
function sigterm_handler {
echo -e "\nThis job just got preempted. No worries, it should restart soon." | tee -a $REPORT
upload_final_report
exit 2
exit 1 # trigger retry
}
trap sigterm_handler SIGTERM