From 46b961b21c82cd2abd0af0331025c9e7d9972ccc Mon Sep 17 00:00:00 2001 From: Emanuel Petr Date: Tue, 4 Jun 2024 12:43:21 +0200 Subject: [PATCH] [#1401] Retry on AWS Spot Instance interruption --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5d72eb83..00022572c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,15 @@ variables: # not cloned by default. GIT_SUBMODULE_STRATEGY: none +default: + # 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 + - stuck_or_timeout_failure + # stages order stages: - checks