Merge "trig-param-build: Utilize convert_mapping_to_xml"

This commit is contained in:
Zuul 2018-09-16 18:51:26 +00:00 committed by Gerrit Code Review
commit 27e944369c
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):