diff options
author | Zuul <zuul@review.openstack.org> | 2018-09-16 18:51:26 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-09-16 18:51:26 +0000 |
commit | 27e944369c1623c9eb70cb7f6cf6227584ae56ee (patch) | |
tree | 61d811bb92d73a3a5bfbde1aab924064726b7388 | |
parent | 8bc2ad3b6223eac653cce6fff2c38bc8985d5713 (diff) | |
parent | e14e748c5a3a74e70a1bbb0c4dc46fdbebb7ed3f (diff) |
Merge "trig-param-build: Utilize convert_mapping_to_xml"
-rw-r--r-- | jenkins_jobs/modules/publishers.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py index 4b29366..199297d 100644 --- a/jenkins_jobs/modules/publishers.py +++ b/jenkins_jobs/modules/publishers.py | |||
@@ -563,14 +563,12 @@ def trigger_parameterized_builds(registry, xml_parent, data): | |||
563 | 563 | ||
564 | condition = XML.SubElement(tconfig, 'condition') | 564 | condition = XML.SubElement(tconfig, 'condition') |
565 | condition.text = project_def.get('condition', 'ALWAYS') | 565 | condition.text = project_def.get('condition', 'ALWAYS') |
566 | trigger_from_child_projects = XML.SubElement( | 566 | mapping = [ |
567 | tconfig, 'triggerFromChildProjects') | 567 | ('trigger-from-child-projects', 'triggerFromChildProjects', False), |
568 | trigger_from_child_projects.text = str( | 568 | ('trigger-with-no-params', 'triggerWithNoParameters', False), |
569 | project_def.get('trigger-from-child-projects', False)).lower() | 569 | ] |
570 | trigger_with_no_params = XML.SubElement(tconfig, | 570 | helpers.convert_mapping_to_xml( |
571 | 'triggerWithNoParameters') | 571 | tconfig, project_def, mapping, fail_required=False) |
572 | trigger_with_no_params.text = str( | ||
573 | project_def.get('trigger-with-no-params', False)).lower() | ||
574 | 572 | ||
575 | 573 | ||
576 | def trigger(registry, xml_parent, data): | 574 | def trigger(registry, xml_parent, data): |