Skip to content
Permalink
Browse files

Docker: Prevent crash looping

  • Loading branch information...
oschuett committed Apr 6, 2019
1 parent dd6be25 commit 402e0699ef11255f968462b00af546b3963ff503
Showing with 2 additions and 2 deletions.
  1. +2 −2 tools/docker/scripts/ci_entrypoint.sh
@@ -40,15 +40,15 @@ 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

# Handle preemption gracefully.
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

0 comments on commit 402e069

Please sign in to comment.
You can’t perform that action at this time.