Browse Source

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
changes/73/536773/5
Tobias Henkel 4 years ago
parent
commit
940da00e9b
No known key found for this signature in database GPG Key ID: 3750DEC158E5FA2
  1. 18
      doc/source/admin/components.rst
  2. 4
      doc/source/admin/drivers/github.rst
  3. 2
      etc/zuul.conf-sample
  4. 2
      tests/fixtures/zuul-connections-merger.conf
  5. 2
      tests/fixtures/zuul-github-driver.conf
  6. 2
      tests/fixtures/zuul-push-reqs.conf
  7. 4
      zuul/driver/github/githubreporter.py
  8. 2
      zuul/reporter/__init__.py

18
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

4
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

2
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

2
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]

2
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]

2
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]

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

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

Loading…
Cancel
Save