diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst index 715ba39250..d1cbbc52fb 100644 --- a/doc/source/zuul.rst +++ b/doc/source/zuul.rst @@ -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 ~~~~~~~~~~~ diff --git a/tests/fixtures/zuul.conf b/tests/fixtures/zuul.conf index 7c61de10ce..57eca51750 100644 --- a/tests/fixtures/zuul.conf +++ b/tests/fixtures/zuul.conf @@ -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 diff --git a/zuul/scheduler.py b/zuul/scheduler.py index faa10f5752..ca084acfc7 100644 --- a/zuul/scheduler.py +++ b/zuul/scheduler.py @@ -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):