diff --git a/jenkins_jobs/modules/triggers.py b/jenkins_jobs/modules/triggers.py
index 65674d9a2..56485ebd6 100644
--- a/jenkins_jobs/modules/triggers.py
+++ b/jenkins_jobs/modules/triggers.py
@@ -1332,6 +1332,7 @@ def gitlab(registry, xml_parent, data):
:arg list exclude-branches: Defined list of branches to exclude
(default [])
:arg str target-branch-regex: Regular expression to select branches
+ :arg str secret-token: Secret token for build trigger
.. _`branch filter type`:
@@ -1434,7 +1435,8 @@ def gitlab(registry, xml_parent, data):
False),
('add-ci-message', 'addCiMessage', False),
('allow-all-branches', 'allowAllBranches', False),
- ('target-branch-regex', 'targetBranchRegex', '')
+ ('target-branch-regex', 'targetBranchRegex', ''),
+ ('secret-token', 'secretToken', '')
]
list_mapping = (
diff --git a/tests/triggers/fixtures/gitlab001.xml b/tests/triggers/fixtures/gitlab001.xml
index 012c4b9f2..8ae8e77dd 100644
--- a/tests/triggers/fixtures/gitlab001.xml
+++ b/tests/triggers/fixtures/gitlab001.xml
@@ -20,6 +20,7 @@
true
true
+
master, master2, local-test
broken-test, master-foo
diff --git a/tests/triggers/fixtures/gitlab002.xml b/tests/triggers/fixtures/gitlab002.xml
index cf08f3ced..5d150f093 100644
--- a/tests/triggers/fixtures/gitlab002.xml
+++ b/tests/triggers/fixtures/gitlab002.xml
@@ -20,6 +20,7 @@
false
false
+
master
feature
diff --git a/tests/triggers/fixtures/gitlab003.xml b/tests/triggers/fixtures/gitlab003.xml
index 609180d5c..0dc1cdd98 100644
--- a/tests/triggers/fixtures/gitlab003.xml
+++ b/tests/triggers/fixtures/gitlab003.xml
@@ -20,6 +20,7 @@
false
false
+
master
baz, foo, fnord
diff --git a/tests/triggers/fixtures/gitlab004.xml b/tests/triggers/fixtures/gitlab004.xml
index 5dcaeaa2f..01101568e 100644
--- a/tests/triggers/fixtures/gitlab004.xml
+++ b/tests/triggers/fixtures/gitlab004.xml
@@ -20,6 +20,7 @@
true
true
+
master, master2, local-test
broken-test, master-foo
diff --git a/tests/triggers/fixtures/gitlab005.xml b/tests/triggers/fixtures/gitlab005.xml
index 2daa009bc..7d19cb50e 100644
--- a/tests/triggers/fixtures/gitlab005.xml
+++ b/tests/triggers/fixtures/gitlab005.xml
@@ -20,6 +20,7 @@
false
false
+
diff --git a/tests/triggers/fixtures/gitlab006.xml b/tests/triggers/fixtures/gitlab006.xml
index c83293e41..5d6e59995 100644
--- a/tests/triggers/fixtures/gitlab006.xml
+++ b/tests/triggers/fixtures/gitlab006.xml
@@ -20,6 +20,7 @@
true
false
(.*debug.*|.*release.*)
+ secret-build-token
include1, include2
exclude1, exclude2
diff --git a/tests/triggers/fixtures/gitlab006.yaml b/tests/triggers/fixtures/gitlab006.yaml
index bb84e73d2..12d97da10 100644
--- a/tests/triggers/fixtures/gitlab006.yaml
+++ b/tests/triggers/fixtures/gitlab006.yaml
@@ -20,3 +20,4 @@ triggers:
- exclude1
- exclude2
target-branch-regex: '(.*debug.*|.*release.*)'
+ secret-token: 'secret-build-token'
diff --git a/tests/triggers/fixtures/gitlab007.xml b/tests/triggers/fixtures/gitlab007.xml
index f7611fd6e..4efe95099 100644
--- a/tests/triggers/fixtures/gitlab007.xml
+++ b/tests/triggers/fixtures/gitlab007.xml
@@ -20,6 +20,7 @@
true
true
+
master, master2, local-test
broken-test, master-foo
diff --git a/tests/triggers/fixtures/gitlab008.xml b/tests/triggers/fixtures/gitlab008.xml
index dcb2b4d3a..a7281cc56 100644
--- a/tests/triggers/fixtures/gitlab008.xml
+++ b/tests/triggers/fixtures/gitlab008.xml
@@ -20,6 +20,7 @@
true
false
+