diff --git a/jenkins_jobs/modules/triggers.py b/jenkins_jobs/modules/triggers.py index 90f9e2eed..431284893 100644 --- a/jenkins_jobs/modules/triggers.py +++ b/jenkins_jobs/modules/triggers.py @@ -1410,6 +1410,8 @@ def gitlab(registry, xml_parent, data): (default true) :arg bool set-build-description: Set build description to build cause (eg. Merge request or Git Push) (default true) + :arg bool cancel-pending-builds-on-update: Cancel pending merge request + builds on update (default false) :arg bool add-note-merge-request: Add note with build status on merge requests (default true) :arg bool add-vote-merge-request: Vote added to note with build status @@ -1521,6 +1523,7 @@ def gitlab(registry, xml_parent, data): ("ci-skip", "ciSkip", True), ("wip-skip", "skipWorkInProgressMergeRequest", True), ("set-build-description", "setBuildDescription", True), + ("cancel-pending-builds-on-update", "cancelPendingBuildsOnUpdate", False), ("add-note-merge-request", "addNoteOnMergeRequest", True), ("add-vote-merge-request", "addVoteOnMergeRequest", True), ("accept-merge-request-on-success", "acceptMergeRequestOnSuccess", False), diff --git a/tests/triggers/fixtures/gitlab001.xml b/tests/triggers/fixtures/gitlab001.xml index 8ae8e77dd..2f87069f1 100644 --- a/tests/triggers/fixtures/gitlab001.xml +++ b/tests/triggers/fixtures/gitlab001.xml @@ -14,6 +14,7 @@ true true true + false true true false diff --git a/tests/triggers/fixtures/gitlab002.xml b/tests/triggers/fixtures/gitlab002.xml index 5d150f093..f92b5091c 100644 --- a/tests/triggers/fixtures/gitlab002.xml +++ b/tests/triggers/fixtures/gitlab002.xml @@ -14,6 +14,7 @@ true true true + false true true false diff --git a/tests/triggers/fixtures/gitlab003.xml b/tests/triggers/fixtures/gitlab003.xml index 0dc1cdd98..907731e8a 100644 --- a/tests/triggers/fixtures/gitlab003.xml +++ b/tests/triggers/fixtures/gitlab003.xml @@ -14,6 +14,7 @@ true true true + false true true false diff --git a/tests/triggers/fixtures/gitlab004.xml b/tests/triggers/fixtures/gitlab004.xml index 01101568e..8ddde8e38 100644 --- a/tests/triggers/fixtures/gitlab004.xml +++ b/tests/triggers/fixtures/gitlab004.xml @@ -14,6 +14,7 @@ false true false + false false false false diff --git a/tests/triggers/fixtures/gitlab005.xml b/tests/triggers/fixtures/gitlab005.xml index 7d19cb50e..6bda664d8 100644 --- a/tests/triggers/fixtures/gitlab005.xml +++ b/tests/triggers/fixtures/gitlab005.xml @@ -14,6 +14,7 @@ true true true + false true true false diff --git a/tests/triggers/fixtures/gitlab006.xml b/tests/triggers/fixtures/gitlab006.xml index 5d6e59995..36b84fe6e 100644 --- a/tests/triggers/fixtures/gitlab006.xml +++ b/tests/triggers/fixtures/gitlab006.xml @@ -14,6 +14,7 @@ false false false + false false false true diff --git a/tests/triggers/fixtures/gitlab007.xml b/tests/triggers/fixtures/gitlab007.xml index 4efe95099..c51382e8f 100644 --- a/tests/triggers/fixtures/gitlab007.xml +++ b/tests/triggers/fixtures/gitlab007.xml @@ -14,6 +14,7 @@ true true true + false true true false diff --git a/tests/triggers/fixtures/gitlab007.yaml b/tests/triggers/fixtures/gitlab007.yaml index ac2db3c49..31bc2698e 100644 --- a/tests/triggers/fixtures/gitlab007.yaml +++ b/tests/triggers/fixtures/gitlab007.yaml @@ -6,6 +6,7 @@ triggers: trigger-closed-merge-request: true ci-skip: true set-build-description: true + cancel-pending-builds-on-update: false add-note-merge-request: true add-vote-merge-request: true add-ci-message: true diff --git a/tests/triggers/fixtures/gitlab008.xml b/tests/triggers/fixtures/gitlab008.xml index a7281cc56..2e4962d09 100644 --- a/tests/triggers/fixtures/gitlab008.xml +++ b/tests/triggers/fixtures/gitlab008.xml @@ -14,6 +14,7 @@ false true false + true false false false diff --git a/tests/triggers/fixtures/gitlab008.yaml b/tests/triggers/fixtures/gitlab008.yaml index bad401fb1..9dd8ba9e7 100644 --- a/tests/triggers/fixtures/gitlab008.yaml +++ b/tests/triggers/fixtures/gitlab008.yaml @@ -5,6 +5,7 @@ triggers: trigger-open-merge-request-push: both ci-skip: false set-build-description: false + cancel-pending-builds-on-update: true add-note-merge-request: false add-vote-merge-request: false add-ci-message: true