Move status_url from webapp to web section

The webapp will be fully replaced by zuul-web so also move the
status_url setting there.

Change-Id: I8278d9ca81ed7b0a2a2189d42b8b69c5eea2bab5
This commit is contained in:
Tobias Henkel 2018-01-23 12:17:27 +01:00
parent 80730e6c79
commit 940da00e9b
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
8 changed files with 19 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,7 +1,7 @@
[gearman]
server=127.0.0.1
[webapp]
[web]
status_url=http://zuul.example.com/status
[merger]

View File

@ -1,7 +1,7 @@
[gearman]
server=127.0.0.1
[webapp]
[web]
status_url=http://zuul.example.com/status/#{change.number},{change.patchset}
[merger]

View File

@ -1,7 +1,7 @@
[gearman]
server=127.0.0.1
[webapp]
[web]
status_url=http://zuul.example.com/status
[merger]

View File

@ -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,

View File

@ -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)