Update managed_script to use convert_mapping_to_xml()
Change-Id: I72fd229e157f291a80ae15555ca2dd8822a8192b
This commit is contained in:
parent
e3e5a8aabe
commit
a8610107e5
|
@ -2520,11 +2520,8 @@ def managed_script(registry, xml_parent, data):
|
||||||
raise InvalidAttributeError('type', step_type, ['script', 'batch'])
|
raise InvalidAttributeError('type', step_type, ['script', 'batch'])
|
||||||
ms = XML.SubElement(xml_parent,
|
ms = XML.SubElement(xml_parent,
|
||||||
'org.jenkinsci.plugins.managedscripts.' + step)
|
'org.jenkinsci.plugins.managedscripts.' + step)
|
||||||
try:
|
mapping = [('script-id', script_tag, None)]
|
||||||
script_id = data['script-id']
|
convert_mapping_to_xml(ms, data, mapping, fail_required=True)
|
||||||
except KeyError:
|
|
||||||
raise MissingAttributeError('script-id')
|
|
||||||
XML.SubElement(ms, script_tag).text = script_id
|
|
||||||
args = XML.SubElement(ms, 'buildStepArgs')
|
args = XML.SubElement(ms, 'buildStepArgs')
|
||||||
for arg in data.get('args', []):
|
for arg in data.get('args', []):
|
||||||
XML.SubElement(args, 'string').text = arg
|
XML.SubElement(args, 'string').text = arg
|
||||||
|
|
Loading…
Reference in New Issue