From fee147d75eef91be8cbfdd77dd444cc65c29b038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 29 Mar 2019 10:12:40 +0100 Subject: [PATCH] gitlab-ci: Retry jobs after runner system failures Up to twice, for a total of 3 attempts maximum. This will hopefully avoid spurious CI pipeline failures due to intermittent GitLab/docker infrastructure issues. Inspired by https://gitlab.freedesktop.org/mesa/mesa/commit/6140ed3d2c5409bcdb5c0879411690ef222b086c Reviewed-by: Eric Anholt --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb7f42e68..b0e6c2313 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,11 +30,20 @@ stages: - docker-image - build-and-test +# Retry jobs after runner system failures +.retry: &retry + retry: + max: 2 + when: + - runner_system_failure + debian-testing: extends: .debian@container-ifnot-exists stage: docker-image + <<: *retry .common-build-and-test: + <<: *retry stage: build-and-test image: $IMAGE_LOCAL artifacts: