Retry job in case of AWS Spot Instance interruption

(cherry picked from commit bbcce1bfc1)
This commit is contained in:
Emanuel Petr
2024-07-29 13:26:58 +00:00
committed by Nicki Křížek
parent 3f1826f2f7
commit 3ac3aef2fa
+7
View File
@@ -55,6 +55,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:
- precheck
- build