Skip to content

Commit fb63569

Browse files
feat(ci): Cancel running pipeline on new PR push (#9023)
1 parent 6553226 commit fb63569

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.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)