diff --git a/jenkins_jobs/modules/triggers.py b/jenkins_jobs/modules/triggers.py index 18855666d..c1734c31c 100644 --- a/jenkins_jobs/modules/triggers.py +++ b/jenkins_jobs/modules/triggers.py @@ -1176,7 +1176,7 @@ def gitlab(registry, xml_parent, data): 'triggerOpenMergeRequestOnPush', True)] convert_mapping_to_xml(gitlab, data, mapping, fail_required=True) - if plugin_ver == pkg_resources.parse_version('1.1.29'): + if plugin_ver < pkg_resources.parse_version('1.2.0'): if data.get('branch-filter-type', '') == 'All': data['branch-filter-type'] = '' valid_filters = ['', 'NameBasedFilter', 'RegexBasedFilter'] diff --git a/tests/triggers/fixtures/gitlab001.xml b/tests/triggers/fixtures/gitlab001.xml index 2b199809f..1c03682d4 100644 --- a/tests/triggers/fixtures/gitlab001.xml +++ b/tests/triggers/fixtures/gitlab001.xml @@ -3,7 +3,7 @@ true - All + true true diff --git a/tests/triggers/fixtures/gitlab002.xml b/tests/triggers/fixtures/gitlab002.xml index e82157ec9..48a583d9b 100644 --- a/tests/triggers/fixtures/gitlab002.xml +++ b/tests/triggers/fixtures/gitlab002.xml @@ -3,7 +3,7 @@ true - All + true true diff --git a/tests/triggers/fixtures/gitlab003.xml b/tests/triggers/fixtures/gitlab003.xml index 7e85278a1..baf204d09 100644 --- a/tests/triggers/fixtures/gitlab003.xml +++ b/tests/triggers/fixtures/gitlab003.xml @@ -3,7 +3,7 @@ true - All + true true diff --git a/tests/triggers/fixtures/gitlab004.xml b/tests/triggers/fixtures/gitlab004.xml index 94d8f4fd1..d10d661aa 100644 --- a/tests/triggers/fixtures/gitlab004.xml +++ b/tests/triggers/fixtures/gitlab004.xml @@ -3,7 +3,7 @@ both - All + false false diff --git a/tests/triggers/fixtures/gitlab005.xml b/tests/triggers/fixtures/gitlab005.xml index 7870ff705..3e1e168ce 100644 --- a/tests/triggers/fixtures/gitlab005.xml +++ b/tests/triggers/fixtures/gitlab005.xml @@ -3,7 +3,7 @@ never - All + true true