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
|
project-type: freestyle
|
||||||
defaults: global
|
defaults: global
|
||||||
disabled: false
|
disabled: false
|
||||||
|
display-name: 'Fancy job name'
|
||||||
concurrent: true
|
concurrent: true
|
||||||
quiet-period: 5
|
quiet-period: 5
|
||||||
workspace: /srv/build-area/job-name
|
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
|
Boolean value to set whether or not this job should be disabled in
|
||||||
Jenkins. Defaults to ``false`` (job will be enabled).
|
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**
|
**concurrent**
|
||||||
Boolean value to set whether or not Jenkins can run this job
|
Boolean value to set whether or not Jenkins can run this job
|
||||||
concurrently. Defaults to ``false``.
|
concurrently. Defaults to ``false``.
|
||||||
|
@ -18,6 +18,7 @@ later. There are a few basic optional fields for a Job definition::
|
|||||||
project-type: freestyle
|
project-type: freestyle
|
||||||
defaults: global
|
defaults: global
|
||||||
disabled: false
|
disabled: false
|
||||||
|
display-name: 'Fancy job name'
|
||||||
concurrent: true
|
concurrent: true
|
||||||
workspace: /srv/build-area/job-name
|
workspace: /srv/build-area/job-name
|
||||||
quiet-period: 5
|
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
|
Boolean value to set whether or not this job should be disabled in
|
||||||
Jenkins. Defaults to ``false`` (job will be enabled).
|
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**:
|
* **concurrent**:
|
||||||
Boolean value to set whether or not Jenkins can run this job
|
Boolean value to set whether or not Jenkins can run this job
|
||||||
concurrently. Defaults to ``false``.
|
concurrently. Defaults to ``false``.
|
||||||
|
@ -68,6 +68,8 @@ class General(jenkins_jobs.modules.base.Base):
|
|||||||
XML.SubElement(xml, 'disabled').text = 'true'
|
XML.SubElement(xml, 'disabled').text = 'true'
|
||||||
else:
|
else:
|
||||||
XML.SubElement(xml, 'disabled').text = 'false'
|
XML.SubElement(xml, 'disabled').text = 'false'
|
||||||
|
if 'display-name' in data:
|
||||||
|
XML.SubElement(xml, 'displayName').text = data['display-name']
|
||||||
if data.get('block-downstream'):
|
if data.get('block-downstream'):
|
||||||
XML.SubElement(xml,
|
XML.SubElement(xml,
|
||||||
'blockBuildWhenDownstreamBuilding').text = 'true'
|
'blockBuildWhenDownstreamBuilding').text = 'true'
|
||||||
@ -89,7 +91,7 @@ class General(jenkins_jobs.modules.base.Base):
|
|||||||
if 'workspace' in data:
|
if 'workspace' in data:
|
||||||
XML.SubElement(xml, 'customWorkspace').text = \
|
XML.SubElement(xml, 'customWorkspace').text = \
|
||||||
str(data['workspace'])
|
str(data['workspace'])
|
||||||
if('quiet-period' in data):
|
if 'quiet-period' in data:
|
||||||
XML.SubElement(xml, 'quietPeriod').text = str(data['quiet-period'])
|
XML.SubElement(xml, 'quietPeriod').text = str(data['quiet-period'])
|
||||||
node = data.get('node', None)
|
node = data.get('node', None)
|
||||||
if node:
|
if node:
|
||||||
|
Loading…
Reference in New Issue
Block a user