gitlab-ci: Automatically retry jobs after runner system failure
[mesa.git] / .gitlab-ci.yml
index 449516ecab2d41b778bdc02f2fd4fd92ce058c5b..87968b61328f94ee74c02904be6372c22baacb3d 100644 (file)
@@ -20,10 +20,6 @@ variables:
   UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
   UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
 
-cache:
-  paths:
-    - ccache
-
 stages:
   - containers-build
   - build+test
@@ -35,6 +31,10 @@ stages:
     - master
     - merge_requests
     - /^ci([-/].*)?$/
+  retry:
+    max: 2
+    when:
+      - runner_system_failure
 
 
 # CONTAINERS
@@ -69,6 +69,9 @@ ubuntu:
   extends: .ci-run-policy
   image: $UBUNTU_IMAGE
   stage: build+test
+  cache:
+    paths:
+      - ccache
   artifacts:
     when: on_failure
     untracked: true