trig-param-build: Utilize convert_mapping_to_xml

Change-Id: I1f7130bda46f268a9f25de152a0c767f82cbfa1d
Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu>
This commit is contained in:
tanhengyeow 2018-09-16 23:56:55 +08:00
parent 4d5397c496
commit e14e748c5a

View File

@ -563,14 +563,12 @@ def trigger_parameterized_builds(registry, xml_parent, data):
condition = XML.SubElement(tconfig, 'condition') condition = XML.SubElement(tconfig, 'condition')
condition.text = project_def.get('condition', 'ALWAYS') condition.text = project_def.get('condition', 'ALWAYS')
trigger_from_child_projects = XML.SubElement( mapping = [
tconfig, 'triggerFromChildProjects') ('trigger-from-child-projects', 'triggerFromChildProjects', False),
trigger_from_child_projects.text = str( ('trigger-with-no-params', 'triggerWithNoParameters', False),
project_def.get('trigger-from-child-projects', False)).lower() ]
trigger_with_no_params = XML.SubElement(tconfig, helpers.convert_mapping_to_xml(
'triggerWithNoParameters') tconfig, project_def, mapping, fail_required=False)
trigger_with_no_params.text = str(
project_def.get('trigger-with-no-params', False)).lower()
def trigger(registry, xml_parent, data): def trigger(registry, xml_parent, data):