Merge "Update matrix_combinations_param to use convert_xml()"
This commit is contained in:
commit
ed90a0cf0c
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user