summaryrefslogtreecommitdiffstats
path: root/jenkins_jobs/modules/general.py
diff options
context:
space:
mode:
authorBenjamin Staffin <ben@cloudscaling.com>2013-08-12 23:39:30 -0700
committerBenjamin Staffin <ben@cloudscaling.com>2013-11-05 19:04:54 -0800
commit67cfe4ad0dc2e4d8edeb693a486441e94dab11f4 (patch)
tree23e91258541089d59cd7150d4a6c08174e001235 /jenkins_jobs/modules/general.py
parent93cc27a6a3caca0aa2d9a9bc836f9acca67d2f04 (diff)
downloadpython-jenkins-job-builder-67cfe4ad0dc2e4d8edeb693a486441e94dab11f4.tar.gz
python-jenkins-job-builder-67cfe4ad0dc2e4d8edeb693a486441e94dab11f4.tar.xz
python-jenkins-job-builder-67cfe4ad0dc2e4d8edeb693a486441e94dab11f4.zip
Add display-name job property.
There is apparently no way to clear this property using the REST api once it is set, and the included documentation change warns of that. Change-Id: I49c5a91664cd37196f3239854bb0adbcf5b3c9f9
Diffstat (limited to 'jenkins_jobs/modules/general.py')
-rw-r--r--jenkins_jobs/modules/general.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/jenkins_jobs/modules/general.py b/jenkins_jobs/modules/general.py
index 2f3fc9e3..f1d6a7bb 100644
--- a/jenkins_jobs/modules/general.py
+++ b/jenkins_jobs/modules/general.py
@@ -68,6 +68,8 @@ class General(jenkins_jobs.modules.base.Base):
XML.SubElement(xml, 'disabled').text = 'true'
else:
XML.SubElement(xml, 'disabled').text = 'false'
+ if 'display-name' in data:
+ XML.SubElement(xml, 'displayName').text = data['display-name']
if data.get('block-downstream'):
XML.SubElement(xml,
'blockBuildWhenDownstreamBuilding').text = 'true'
@@ -89,7 +91,7 @@ class General(jenkins_jobs.modules.base.Base):
if 'workspace' in data:
XML.SubElement(xml, 'customWorkspace').text = \
str(data['workspace'])
- if('quiet-period' in data):
+ if 'quiet-period' in data:
XML.SubElement(xml, 'quietPeriod').text = str(data['quiet-period'])
node = data.get('node', None)
if node: