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
This commit is contained in:
parent
93cc27a6a3
commit
67cfe4ad0d
@ -34,6 +34,7 @@ later. There are a few basic optional fields for a Job definition::
|
||||
project-type: freestyle
|
||||
defaults: global
|
||||
disabled: false
|
||||
display-name: 'Fancy job name'
|
||||
concurrent: true
|
||||
quiet-period: 5
|
||||
workspace: /srv/build-area/job-name
|
||||
@ -56,6 +57,13 @@ later. There are a few basic optional fields for a Job definition::
|
||||
Boolean value to set whether or not this job should be disabled in
|
||||
Jenkins. Defaults to ``false`` (job will be enabled).
|
||||
|
||||
**display-name**
|
||||
Optional name shown for the project throughout the Jenkins web GUI in place
|
||||
of the actual job name. The jenkins_jobs tool cannot fully remove this trait
|
||||
once it is set, so use caution when setting it. Setting it to the same
|
||||
string as the project name is an effective un-set workaround. Alternately,
|
||||
the field can be cleared manually using the Jenkins web interface.
|
||||
|
||||
**concurrent**
|
||||
Boolean value to set whether or not Jenkins can run this job
|
||||
concurrently. Defaults to ``false``.
|
||||
|
@ -18,6 +18,7 @@ later. There are a few basic optional fields for a Job definition::
|
||||
project-type: freestyle
|
||||
defaults: global
|
||||
disabled: false
|
||||
display-name: 'Fancy job name'
|
||||
concurrent: true
|
||||
workspace: /srv/build-area/job-name
|
||||
quiet-period: 5
|
||||
@ -40,6 +41,14 @@ later. There are a few basic optional fields for a Job definition::
|
||||
Boolean value to set whether or not this job should be disabled in
|
||||
Jenkins. Defaults to ``false`` (job will be enabled).
|
||||
|
||||
* **display-name**:
|
||||
Optional name shown for the project throughout the Jenkins web GUI in
|
||||
place of the actual job name. The jenkins_jobs tool cannot fully remove
|
||||
this trait once it is set, so use caution when setting it. Setting it to
|
||||
the same string as the job's name is an effective un-set workaround.
|
||||
Alternately, the field can be cleared manually using the Jenkins web
|
||||
interface.
|
||||
|
||||
* **concurrent**:
|
||||
Boolean value to set whether or not Jenkins can run this job
|
||||
concurrently. Defaults to ``false``.
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user