diff --git a/doc/source/admin/components.rst b/doc/source/admin/components.rst index d6b0984d24..fa72c66150 100644 --- a/doc/source/admin/components.rst +++ b/doc/source/admin/components.rst @@ -71,7 +71,7 @@ An example ``zuul.conf``: [zookeeper] hosts=zk1.example.com,zk2.example.com,zk3.example.com - [webapp] + [web] status_url=https://zuul.example.com/status [scheduler] @@ -234,6 +234,15 @@ The following sections of ``zuul.conf`` are used by the scheduler: An openssl file containing the server private key in PEM format. +.. attr:: web + + .. attr:: status_url + + URL that will be posted in Zuul comments made to changes when + starting jobs for a change. + + .. TODO: is this effectively required? + .. attr:: webapp .. attr:: listen_address @@ -251,13 +260,6 @@ The following sections of ``zuul.conf`` are used by the scheduler: Zuul will cache the status.json file for this many seconds. - .. attr:: status_url - - URL that will be posted in Zuul comments made to changes when - starting jobs for a change. - - .. TODO: is this effectively required? - .. attr:: scheduler .. attr:: command_socket diff --git a/doc/source/admin/drivers/github.rst b/doc/source/admin/drivers/github.rst index 4f46af6941..83ac77febe 100644 --- a/doc/source/admin/drivers/github.rst +++ b/doc/source/admin/drivers/github.rst @@ -317,10 +317,10 @@ itself. Status name, description, and context is taken from the pipeline. reporter should set as the commit status on github. .. TODO support role markup in :default: so we can xref - :attr:`webapp.status_url` below + :attr:`web.status_url` below .. attr:: status-url - :default: webapp.status_url or the empty string + :default: web.status_url or the empty string String value for a link url to set in the github status. Defaults to the zuul server status_url, or the empty diff --git a/etc/zuul.conf-sample b/etc/zuul.conf-sample index 17092af55f..3b1ad76d28 100644 --- a/etc/zuul.conf-sample +++ b/etc/zuul.conf-sample @@ -39,11 +39,11 @@ listen_address=127.0.0.1 port=9000 static_cache_expiry=0 ;sql_connection_name=mydatabase +status_url=https://zuul.example.com/status [webapp] listen_address=0.0.0.0 port=8001 -status_url=https://zuul.example.com/status [connection gerrit] driver=gerrit diff --git a/tests/fixtures/zuul-connections-merger.conf b/tests/fixtures/zuul-connections-merger.conf index 771fc5057d..15769ef025 100644 --- a/tests/fixtures/zuul-connections-merger.conf +++ b/tests/fixtures/zuul-connections-merger.conf @@ -1,7 +1,7 @@ [gearman] server=127.0.0.1 -[webapp] +[web] status_url=http://zuul.example.com/status [merger] diff --git a/tests/fixtures/zuul-github-driver.conf b/tests/fixtures/zuul-github-driver.conf index a96bde2ee2..b6a7753dbd 100644 --- a/tests/fixtures/zuul-github-driver.conf +++ b/tests/fixtures/zuul-github-driver.conf @@ -1,7 +1,7 @@ [gearman] server=127.0.0.1 -[webapp] +[web] status_url=http://zuul.example.com/status/#{change.number},{change.patchset} [merger] diff --git a/tests/fixtures/zuul-push-reqs.conf b/tests/fixtures/zuul-push-reqs.conf index 2217f94a06..b902d3f349 100644 --- a/tests/fixtures/zuul-push-reqs.conf +++ b/tests/fixtures/zuul-push-reqs.conf @@ -1,7 +1,7 @@ [gearman] server=127.0.0.1 -[webapp] +[web] status_url=http://zuul.example.com/status [merger] diff --git a/zuul/driver/github/githubreporter.py b/zuul/driver/github/githubreporter.py index 848ae1b3a9..57b594b1f4 100644 --- a/zuul/driver/github/githubreporter.py +++ b/zuul/driver/github/githubreporter.py @@ -105,8 +105,8 @@ class GithubReporter(BaseReporter): url_pattern = self.config.get('status-url') if not url_pattern: sched_config = self.connection.sched.config - if sched_config.has_option('webapp', 'status_url'): - url_pattern = sched_config.get('webapp', 'status_url') + if sched_config.has_option('web', 'status_url'): + url_pattern = sched_config.get('web', 'status_url') url = item.formatUrlPattern(url_pattern) if url_pattern else '' description = '%s status: %s' % (item.pipeline.name, diff --git a/zuul/reporter/__init__.py b/zuul/reporter/__init__.py index 1bff5cb944..e05ee06654 100644 --- a/zuul/reporter/__init__.py +++ b/zuul/reporter/__init__.py @@ -75,7 +75,7 @@ class BaseReporter(object, metaclass=abc.ABCMeta): def _formatItemReportStart(self, item, with_jobs=True): status_url = get_default(self.connection.sched.config, - 'webapp', 'status_url', '') + 'web', 'status_url', '') return item.pipeline.start_message.format(pipeline=item.pipeline, status_url=status_url)