Retry job in case of AWS Spot Instance interruption

This commit is contained in:
Emanuel Petr 2024-06-17 20:06:13 +02:00 committed by Nicki Křížek
parent a64ecc5fdd
commit bbcce1bfc1
No known key found for this signature in database
GPG key ID: 01623B9B652A20A7

View file

@ -64,6 +64,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