Skip to content

Commit 3e5c0b4

Browse files
committed
feat(ci): Cancel running pipeline on new PR push
1 parent 8e58785 commit 3e5c0b4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.gitlab-ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ variables:
4141
description: "Enable flaky tests"
4242
value: "false"
4343

44+
default:
45+
interruptible: true
46+
47+
# trigger new commit cancel
48+
workflow:
49+
auto_cancel:
50+
on_new_commit: interruptible
51+
rules:
52+
- if: '$CI_COMMIT_BRANCH == "master"'
53+
auto_cancel:
54+
on_new_commit: none
55+
- if: '$CI_COMMIT_BRANCH =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
56+
auto_cancel:
57+
on_new_commit: none
58+
- when: always
59+
4460
.test_matrix: &test_matrix
4561
- testJvm: &test_jvms
4662
- "8"

0 commit comments

Comments
 (0)