From bbb9130481fc23b2423fbb316c5f0d6cca1daca7 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Wed, 4 Oct 2023 15:58:47 +0100
Subject: [PATCH] Issue #3390658 by longwave, bbrala: GitLab should retry jobs
 that fail outside test failures

---
 .gitlab-ci.yml          | 8 ++++++++
 .gitlab-ci/pipeline.yml | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 935dc6d7ff6f..51b24f41e592 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -64,6 +64,14 @@ stages:
 .default-job-settings: &default-job-settings-lint
   interruptible: true
   allow_failure: false
+  retry:
+    max: 2
+    when:
+      - unknown_failure
+      - api_failure
+      - stuck_or_timeout_failure
+      - runner_system_failure
+      - scheduler_failure
   variables:
     _TARGET_PHP: "8.2"
     _TARGET_DB: "sqlite-3"
diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index f8f2afb4fdc1..08952b0041d2 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -23,6 +23,14 @@ stages:
 .default-job-settings: &default-job-settings
   interruptible: true
   allow_failure: false
+  retry:
+    max: 2
+    when:
+      - unknown_failure
+      - api_failure
+      - stuck_or_timeout_failure
+      - runner_system_failure
+      - scheduler_failure
   image:
     name: $_CONFIG_DOCKERHUB_ROOT/php-$_TARGET_PHP-apache:production
   rules:
-- 
GitLab