Skip to content

Commit 7a3da0a

Browse files
Touni AtchadéGitLab
authored andcommitted
Prevent bleeding-edge jobs from running on CC
Community contribution branches may include `feature/` jobs, which incorrectly triggers bleeding-edge workflows. This change ensures those jobs are not executed on CC branches.
1 parent f133bf2 commit 7a3da0a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.gitlab/ci/_rules.gitlab-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@
9999
.if-runner-or-security-bleeding-edge-release-ref: &if-runner-or-security-bleeding-edge-release-ref
100100
if: $CI_COMMIT_REF_NAME =~ /\Av[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+\z/ && ($CI_PROJECT_PATH == "gitlab-org/gitlab-runner" || $CI_PROJECT_PATH == "gitlab-org/security/gitlab-runner")
101101

102+
.if-not-gitlab-runner-community-path: &if-not-gitlab-runner-community-path
103+
if: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH != null && $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH !~ /^gitlab-org($|\/)/
104+
102105
########################
103106
# Default branch rules #
104107
########################
@@ -285,6 +288,8 @@
285288

286289
.rules:release:bleeding-edge:
287290
rules:
291+
- <<: *if-not-gitlab-runner-community-path
292+
when: never
288293
- <<: *if-runner-default-branch
289294
changes: *code-backstage-patterns
290295
- <<: *if-runner-bleeding-edge-release-ref
@@ -296,6 +301,8 @@
296301

297302
.rules:release-or-security:bleeding-edge-or-stable:
298303
rules:
304+
- <<: *if-not-gitlab-runner-community-path
305+
when: never
299306
- <<: *if-runner-or-security-runner-default-branch
300307
changes: *code-backstage-patterns
301308
- <<: *if-runner-or-security-bleeding-edge-release-ref

0 commit comments

Comments
 (0)