Merge "Update matrix_combinations_param to use convert_xml()"

This commit is contained in:
Jenkins 2017-07-10 05:16:10 +00:00 committed by Gerrit Code Review
commit ed90a0cf0c

View File

@ -713,15 +713,12 @@ def matrix_combinations_param(registry, xml_parent, data):
element_name = 'hudson.plugins.matrix__configuration__parameter.' \ element_name = 'hudson.plugins.matrix__configuration__parameter.' \
'MatrixCombinationsParameterDefinition' 'MatrixCombinationsParameterDefinition'
pdef = XML.SubElement(xml_parent, element_name) pdef = XML.SubElement(xml_parent, element_name)
if 'name' not in data:
raise JenkinsJobsException('matrix-combinations must have a name ' mapping = [
'parameter.') ('name', 'name', None),
XML.SubElement(pdef, 'name').text = data['name'] ('description', 'description', ''),
XML.SubElement(pdef, 'description').text = data.get('description', '') ('filter', 'defaultCombinationFilter', '')]
combination_filter = data.get('filter') convert_mapping_to_xml(pdef, data, mapping, fail_required=True)
if combination_filter:
XML.SubElement(pdef, 'defaultCombinationFilter').text = \
combination_filter
return pdef return pdef