summaryrefslogtreecommitdiffstats
path: root/jenkins_jobs/modules/general.py
diff options
context:
space:
mode:
authorWill Soula <william.soula@drillinginfo.com>2013-03-18 14:03:58 -0500
committerJenkins <jenkins@review.openstack.org>2013-03-21 23:30:28 +0000
commitcd3cbd91cb8040f9007848d3cd68272428193563 (patch)
tree443f0b711742336cfceea3a62f7e552453dec7d9 /jenkins_jobs/modules/general.py
parentf2ea8405c14552b6f01eb0762e9378fb988edb50 (diff)
downloadpython-jenkins-job-builder-cd3cbd91cb8040f9007848d3cd68272428193563.tar.gz
python-jenkins-job-builder-cd3cbd91cb8040f9007848d3cd68272428193563.tar.xz
python-jenkins-job-builder-cd3cbd91cb8040f9007848d3cd68272428193563.zip
Jobs not tied to a node can roam
Previously if you did not specify a node for a job to build on then the job would be marked as tied to master. The checkbox for 'Restrict where this project can be run' would be checked but nothing entered into the textbox so it ended up tied to master. This change adds an else to the check for 'node' and if 'node' is not found then canRoam is set to true. This is a two line change to modules/general.py Change-Id: Id7e40ba5ae2eaa92fd7678da7b3acefc1ba4ee32 Reviewed-on: https://review.openstack.org/24669 Reviewed-by: Khai Do <zaro0508@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
Diffstat (limited to 'jenkins_jobs/modules/general.py')
-rw-r--r--jenkins_jobs/modules/general.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/general.py b/jenkins_jobs/modules/general.py
index dc957b17..79163016 100644
--- a/jenkins_jobs/modules/general.py
+++ b/jenkins_jobs/modules/general.py
@@ -87,6 +87,8 @@ class General(jenkins_jobs.modules.base.Base):
if node:
XML.SubElement(xml, 'assignedNode').text = node
XML.SubElement(xml, 'canRoam').text = 'false'
+ else:
+ XML.SubElement(xml, 'canRoam').text = 'true'
if 'logrotate' in data:
lr_xml = XML.SubElement(xml, 'logRotator')
logrotate = data['logrotate']