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
1 changed files with 6 additions and 8 deletions

View File

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