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] [zookeeper]
hosts=zk1.example.com,zk2.example.com,zk3.example.com hosts=zk1.example.com,zk2.example.com,zk3.example.com
[webapp] [web]
status_url=https://zuul.example.com/status status_url=https://zuul.example.com/status
[scheduler] [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. 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:: webapp
.. attr:: listen_address .. 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. 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:: scheduler
.. attr:: command_socket .. 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. reporter should set as the commit status on github.
.. TODO support role markup in :default: so we can xref .. TODO support role markup in :default: so we can xref
:attr:`webapp.status_url` below :attr:`web.status_url` below
.. attr:: status-url .. 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 String value for a link url to set in the github
status. Defaults to the zuul server status_url, or the empty 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 port=9000
static_cache_expiry=0 static_cache_expiry=0
;sql_connection_name=mydatabase ;sql_connection_name=mydatabase
status_url=https://zuul.example.com/status
[webapp] [webapp]
listen_address=0.0.0.0 listen_address=0.0.0.0
port=8001 port=8001
status_url=https://zuul.example.com/status
[connection gerrit] [connection gerrit]
driver=gerrit driver=gerrit

View File

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

View File

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

View File

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

View File

@ -105,8 +105,8 @@ class GithubReporter(BaseReporter):
url_pattern = self.config.get('status-url') url_pattern = self.config.get('status-url')
if not url_pattern: if not url_pattern:
sched_config = self.connection.sched.config sched_config = self.connection.sched.config
if sched_config.has_option('webapp', 'status_url'): if sched_config.has_option('web', 'status_url'):
url_pattern = sched_config.get('webapp', 'status_url') url_pattern = sched_config.get('web', 'status_url')
url = item.formatUrlPattern(url_pattern) if url_pattern else '' url = item.formatUrlPattern(url_pattern) if url_pattern else ''
description = '%s status: %s' % (item.pipeline.name, 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): def _formatItemReportStart(self, item, with_jobs=True):
status_url = get_default(self.connection.sched.config, status_url = get_default(self.connection.sched.config,
'webapp', 'status_url', '') 'web', 'status_url', '')
return item.pipeline.start_message.format(pipeline=item.pipeline, return item.pipeline.start_message.format(pipeline=item.pipeline,
status_url=status_url) status_url=status_url)