Add option to include job name in report
This can be used to create more sophisticated commentLinks in Gerrit. Change-Id: I74702fd7d37358e6f4caa7e7ac0a3ede73184077
This commit is contained in:
parent
b11fa97632
commit
8fef52b0a8
|
@ -133,6 +133,12 @@ zuul
|
|||
URLs for those links should be.
|
||||
``http://logs.example.com/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}``
|
||||
|
||||
**job_name_in_report**
|
||||
Boolean value (``true`` or ``false``) that indicates whether the
|
||||
job name should be included in the report (normally only the URL
|
||||
is included). Defaults to ``false``.
|
||||
``job_name_in_report=true``
|
||||
|
||||
layout.yaml
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -13,3 +13,4 @@ git_user_email=zuul@example.com
|
|||
git_user_name=zuul
|
||||
push_change_refs=true
|
||||
url_pattern=http://logs.example.com/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number}
|
||||
job_name_in_report=true
|
||||
|
|
|
@ -1137,7 +1137,14 @@ class BasePipelineManager(object):
|
|||
elapsed = ' in %ds' % (s)
|
||||
else:
|
||||
elapsed = ''
|
||||
ret += '- %s : %s%s%s\n' % (url, result, elapsed, voting)
|
||||
if self.sched.config.has_option('zuul', 'job_name_in_report'):
|
||||
if self.sched.config.getboolean('zuul',
|
||||
'job_name_in_report'):
|
||||
name = job.name + ' '
|
||||
else:
|
||||
name = ''
|
||||
ret += '- %s%s : %s%s%s\n' % (name, url, result, elapsed,
|
||||
voting)
|
||||
return ret
|
||||
|
||||
def formatDescription(self, build):
|
||||
|
|
Loading…
Reference in New Issue