summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortanhengyeow <E0032242@u.nus.edu>2018-09-16 23:56:55 +0800
committertanhengyeow <E0032242@u.nus.edu>2018-09-16 23:57:51 +0800
commite14e748c5a3a74e70a1bbb0c4dc46fdbebb7ed3f (patch)
tree8c37d92cf58415353dd028d0d5efae6a9d441c0a
parent4d5397c496abc1097d7214dafee5f16d7f49e066 (diff)
trig-param-build: Utilize convert_mapping_to_xml
Change-Id: I1f7130bda46f268a9f25de152a0c767f82cbfa1d Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu>
Notes
Notes (review): Code-Review+2: Sorin Sbarnea <ssbarnea@redhat.com> Code-Review+2: Thanh Ha (zxiiro) <zxiiro@gmail.com> Workflow+1: Thanh Ha (zxiiro) <zxiiro@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sun, 16 Sep 2018 18:51:26 +0000 Reviewed-on: https://review.openstack.org/602974 Project: openstack-infra/jenkins-job-builder Branch: refs/heads/master
-rw-r--r--jenkins_jobs/modules/publishers.py14
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
576def trigger(registry, xml_parent, data): 574def trigger(registry, xml_parent, data):