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
6140ed3d2c
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
b5ef99f26a
commit
fee147d75e
|
@ -30,11 +30,20 @@ stages:
|
||||||
- docker-image
|
- docker-image
|
||||||
- build-and-test
|
- build-and-test
|
||||||
|
|
||||||
|
# Retry jobs after runner system failures
|
||||||
|
.retry: &retry
|
||||||
|
retry:
|
||||||
|
max: 2
|
||||||
|
when:
|
||||||
|
- runner_system_failure
|
||||||
|
|
||||||
debian-testing:
|
debian-testing:
|
||||||
extends: .debian@container-ifnot-exists
|
extends: .debian@container-ifnot-exists
|
||||||
stage: docker-image
|
stage: docker-image
|
||||||
|
<<: *retry
|
||||||
|
|
||||||
.common-build-and-test:
|
.common-build-and-test:
|
||||||
|
<<: *retry
|
||||||
stage: build-and-test
|
stage: build-and-test
|
||||||
image: $IMAGE_LOCAL
|
image: $IMAGE_LOCAL
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
Loading…
Reference in New Issue