STORY: 2009994

add support triggerOnlyIfNewCommitsPushed option

Change-Id: I1e777bdd47d7cd93839c6edde6f75737972c242a
This commit is contained in:
Max Trunov 2022-04-15 10:12:54 +05:00
parent fc4985e63d
commit 0fdb576ee5
11 changed files with 14 additions and 0 deletions

View File

@ -1638,6 +1638,9 @@ def gitlab(registry, xml_parent, data):
* **never** (default)
* **source**
* **both**
:arg bool trigger-only-if-new-commits-pushed: Trigger a build on commits pushed
only, but not trigger on another MR changes(label, edit, assign, etc)
(>=1.5.17)(default false)
:arg bool trigger-note: Build when comment is added with defined phrase
(>= 1.2.4) (default true)
:arg str note-regex: Phrase that triggers the build (>= 1.2.4) (default
@ -1755,6 +1758,7 @@ def gitlab(registry, xml_parent, data):
mapping = [
("trigger-push", "triggerOnPush", True),
("trigger-merge-request", "triggerOnMergeRequest", True),
("trigger-only-if-new-commits-pushed", "triggerOnlyIfNewCommitsPushed", False),
("trigger-accepted-merge-request", "triggerOnAcceptedMergeRequest", False),
("trigger-closed-merge-request", "triggerOnClosedMergeRequest", False),
("trigger-note", "triggerOnNoteRequest", True),

View File

@ -7,6 +7,7 @@
<spec/>
<triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest>
<triggerOnlyIfNewCommitsPushed>false</triggerOnlyIfNewCommitsPushed>
<triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
<triggerOnNoteRequest>true</triggerOnNoteRequest>

View File

@ -7,6 +7,7 @@
<spec/>
<triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest>
<triggerOnlyIfNewCommitsPushed>false</triggerOnlyIfNewCommitsPushed>
<triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
<triggerOnNoteRequest>true</triggerOnNoteRequest>

View File

@ -7,6 +7,7 @@
<spec/>
<triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest>
<triggerOnlyIfNewCommitsPushed>false</triggerOnlyIfNewCommitsPushed>
<triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
<triggerOnNoteRequest>true</triggerOnNoteRequest>

View File

@ -7,6 +7,7 @@
<spec/>
<triggerOnPush>false</triggerOnPush>
<triggerOnMergeRequest>false</triggerOnMergeRequest>
<triggerOnlyIfNewCommitsPushed>false</triggerOnlyIfNewCommitsPushed>
<triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
<triggerOnNoteRequest>true</triggerOnNoteRequest>

View File

@ -2,6 +2,7 @@ triggers:
- gitlab:
trigger-push: false
trigger-merge-request: false
trigger-only-if-new-commits-pushed: false
trigger-open-merge-request-push: both
ci-skip: false
set-build-description: false

View File

@ -7,6 +7,7 @@
<spec/>
<triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest>
<triggerOnlyIfNewCommitsPushed>false</triggerOnlyIfNewCommitsPushed>
<triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
<triggerOnNoteRequest>true</triggerOnNoteRequest>

View File

@ -7,6 +7,7 @@
<spec/>
<triggerOnPush>false</triggerOnPush>
<triggerOnMergeRequest>false</triggerOnMergeRequest>
<triggerOnlyIfNewCommitsPushed>false</triggerOnlyIfNewCommitsPushed>
<triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
<triggerOnNoteRequest>true</triggerOnNoteRequest>

View File

@ -7,6 +7,7 @@
<spec/>
<triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest>
<triggerOnlyIfNewCommitsPushed>true</triggerOnlyIfNewCommitsPushed>
<triggerOnAcceptedMergeRequest>true</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>true</triggerOnClosedMergeRequest>
<triggerOnNoteRequest>true</triggerOnNoteRequest>

View File

@ -2,6 +2,7 @@ triggers:
- gitlab:
trigger-push: true
trigger-merge-request: true
trigger-only-if-new-commits-pushed: true
trigger-accepted-merge-request: true
trigger-closed-merge-request: true
ci-skip: true

View File

@ -7,6 +7,7 @@
<spec/>
<triggerOnPush>false</triggerOnPush>
<triggerOnMergeRequest>false</triggerOnMergeRequest>
<triggerOnlyIfNewCommitsPushed>false</triggerOnlyIfNewCommitsPushed>
<triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest>
<triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest>
<triggerOnNoteRequest>true</triggerOnNoteRequest>