From 5335f4eeea73cb527c09ab22fa4367e1e3f774a9 Mon Sep 17 00:00:00 2001 From: Kien Ha Date: Tue, 9 Aug 2016 21:51:32 -0400 Subject: [PATCH] Fix issue that cause JCloud instance to be set Fix an issue where JCloud instances creation was being set in jjb despite only passing single-use option. Change-Id: I5de2279cdd53f1c092f950783d85c900b39e0fe9 Signed-off-by: Kien Ha --- jenkins_jobs/modules/wrappers.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jenkins_jobs/modules/wrappers.py b/jenkins_jobs/modules/wrappers.py index 53e475053..ec0fb3f59 100644 --- a/jenkins_jobs/modules/wrappers.py +++ b/jenkins_jobs/modules/wrappers.py @@ -1089,11 +1089,10 @@ def jclouds(parser, xml_parent, data): count: 2 stop-on-terminate: False """ - buildWrapper = XML.SubElement(xml_parent, - 'jenkins.plugins.jclouds.compute.' - 'JCloudsBuildWrapper') - instances = XML.SubElement(buildWrapper, 'instancesToRun') if 'instances' in data: + buildWrapper = XML.SubElement( + xml_parent, 'jenkins.plugins.jclouds.compute.JCloudsBuildWrapper') + instances = XML.SubElement(buildWrapper, 'instancesToRun') for foo in data['instances']: for template, params in foo.items(): instance = XML.SubElement(instances,