From ec1a6e1339bd3d5c3b33a32388517bfe8c3c993c Mon Sep 17 00:00:00 2001 From: Emanuel Petr Date: Mon, 17 Jun 2024 20:06:13 +0200 Subject: [PATCH] Retry job in case of AWS Spot Instance interruption (cherry picked from commit bbcce1bfc1243d74ff0ec736e7d370c4cb8591f2) --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25541bcf43..0779e09464 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,6 +62,13 @@ default: # See: https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-redundant-pipelines interruptible: true + # AWS can interrupt the spot instance anytime, so let's retry the job when + # the interruption event happens to avoid a pipeline failure. + retry: + max: 2 + when: + - runner_system_failure + stages: - autoconf - precheck