From 7152f343d6d73d2fbc05629c8a31215b2d31c3a6 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 5 Feb 2025 19:21:48 +0100 Subject: [PATCH] ci: only trigger the CI for release managers when pushing to staging branch The release branch contains only what was on the staging branch first, so testing it again is a waste of resources. To do this, we split the rule into specifically "default branch" and "staging branch", and "release branch" gets dropped by virtue of no longer being caught by any rule. Cc: mesa-stable Reviewed-by: Martin Roukala Reviewed-by: Dylan Baker Part-of: --- .gitlab-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b54eed826e..9714a4064fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,7 +57,11 @@ workflow: # Note: 0 = infinity = gitlab's job `timeout:` applies, which is 1h BUILD_JOB_TIMEOUT_OVERRIDE: 0 # pipeline for direct pushes that bypassed the CI - - if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" + - if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + variables: + JOB_PRIORITY: 70 + # pipeline for direct pushes from release maintainer + - if: &is-staging-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\// variables: JOB_PRIORITY: 70