From 773815f72741f2d7ae756391f6564a60e4bfc5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 23 Oct 2025 23:10:15 +0200 Subject: [PATCH] ci: Apply GNOME templates default rules Re-use rules from https://gitlab.gnome.org/GNOME/citemplates/ default-rules template, but without importing them to ensure that changes in the citemplates project won't affect us directly So we have some basic control on what should trigger a workflow, auto-retry and auto-replace on subsequent pushes --- .gitlab-ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff726d27c..3c03038b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,26 @@ include: dist-job-name: "dist-job" tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}" +# This is based on GNOME/citemplates default-rules, but we only apply the +# settings that make sense for glib +default: + interruptible: true + # Auto-retry jobs in case of infra failures + retry: + max: 1 + when: + - "runner_system_failure" + - "stuck_or_timeout_failure" + - "scheduler_failure" + - "api_failure" + +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == "web" + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_TAG + - if: $CI_COMMIT_BRANCH + stages: - style-check - build