Fixed serialization for 'branch-filter-type' of gitlab

tag 'branchFilterType' was introduced only in GitLab+Plugin ver. 1.2.0

Change-Id: I8cee5b4b77431fa78d28fe359a4fafc5609bde3e
Story: 2000875
This commit is contained in:
Bulat Gaifullin 2017-02-21 20:26:04 +03:00
parent 4960f92ad3
commit 38fc311dcd
6 changed files with 6 additions and 6 deletions

View File

@ -1176,7 +1176,7 @@ def gitlab(registry, xml_parent, data):
'triggerOpenMergeRequestOnPush', True)] 'triggerOpenMergeRequestOnPush', True)]
convert_mapping_to_xml(gitlab, data, mapping, fail_required=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': if data.get('branch-filter-type', '') == 'All':
data['branch-filter-type'] = '' data['branch-filter-type'] = ''
valid_filters = ['', 'NameBasedFilter', 'RegexBasedFilter'] valid_filters = ['', 'NameBasedFilter', 'RegexBasedFilter']

View File

@ -3,7 +3,7 @@
<triggers class="vector"> <triggers class="vector">
<com.dabsquared.gitlabjenkins.GitLabPushTrigger> <com.dabsquared.gitlabjenkins.GitLabPushTrigger>
<triggerOpenMergeRequestOnPush>true</triggerOpenMergeRequestOnPush> <triggerOpenMergeRequestOnPush>true</triggerOpenMergeRequestOnPush>
<branchFilterType>All</branchFilterType> <branchFilterName/>
<spec/> <spec/>
<triggerOnPush>true</triggerOnPush> <triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest> <triggerOnMergeRequest>true</triggerOnMergeRequest>

View File

@ -3,7 +3,7 @@
<triggers class="vector"> <triggers class="vector">
<com.dabsquared.gitlabjenkins.GitLabPushTrigger> <com.dabsquared.gitlabjenkins.GitLabPushTrigger>
<triggerOpenMergeRequestOnPush>true</triggerOpenMergeRequestOnPush> <triggerOpenMergeRequestOnPush>true</triggerOpenMergeRequestOnPush>
<branchFilterType>All</branchFilterType> <branchFilterName/>
<spec/> <spec/>
<triggerOnPush>true</triggerOnPush> <triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest> <triggerOnMergeRequest>true</triggerOnMergeRequest>

View File

@ -3,7 +3,7 @@
<triggers class="vector"> <triggers class="vector">
<com.dabsquared.gitlabjenkins.GitLabPushTrigger> <com.dabsquared.gitlabjenkins.GitLabPushTrigger>
<triggerOpenMergeRequestOnPush>true</triggerOpenMergeRequestOnPush> <triggerOpenMergeRequestOnPush>true</triggerOpenMergeRequestOnPush>
<branchFilterType>All</branchFilterType> <branchFilterName/>
<spec/> <spec/>
<triggerOnPush>true</triggerOnPush> <triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest> <triggerOnMergeRequest>true</triggerOnMergeRequest>

View File

@ -3,7 +3,7 @@
<triggers class="vector"> <triggers class="vector">
<com.dabsquared.gitlabjenkins.GitLabPushTrigger> <com.dabsquared.gitlabjenkins.GitLabPushTrigger>
<triggerOpenMergeRequestOnPush>both</triggerOpenMergeRequestOnPush> <triggerOpenMergeRequestOnPush>both</triggerOpenMergeRequestOnPush>
<branchFilterType>All</branchFilterType> <branchFilterName/>
<spec/> <spec/>
<triggerOnPush>false</triggerOnPush> <triggerOnPush>false</triggerOnPush>
<triggerOnMergeRequest>false</triggerOnMergeRequest> <triggerOnMergeRequest>false</triggerOnMergeRequest>

View File

@ -3,7 +3,7 @@
<triggers class="vector"> <triggers class="vector">
<com.dabsquared.gitlabjenkins.GitLabPushTrigger> <com.dabsquared.gitlabjenkins.GitLabPushTrigger>
<triggerOpenMergeRequestOnPush>never</triggerOpenMergeRequestOnPush> <triggerOpenMergeRequestOnPush>never</triggerOpenMergeRequestOnPush>
<branchFilterType>All</branchFilterType> <branchFilterName/>
<spec/> <spec/>
<triggerOnPush>true</triggerOnPush> <triggerOnPush>true</triggerOnPush>
<triggerOnMergeRequest>true</triggerOnMergeRequest> <triggerOnMergeRequest>true</triggerOnMergeRequest>