summaryrefslogtreecommitdiff
path: root/zuul/scheduler.py
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2019-08-08 09:24:13 -0700
committerJames E. Blair <jeblair@redhat.com>2019-08-08 09:46:53 -0700
commitf13cc924df19d12b3ca76dd51dce82e256d52d9a (patch)
treec0c90558a1c726546e07825964bb2248f022e9ef /zuul/scheduler.py
parent29bbbd69b4a6370ec16ceb0e2c0e302c2756662d (diff)
downloadzuul-f13cc924df19d12b3ca76dd51dce82e256d52d9a.tar.gz
Add option to report build page
This adds a tenant option to use the Zuul web build page as the URL reported to the code review system when a build completes. The setting is per-tenant (because it requires that the tenant have a working SQL reporter configured in all pipelines) and defaults to false, since we can't guarantee that. In the future, we expect to make SQL reporting implicit, then this can default to true and eventually be deprecated. A new zuul.conf option is added and marked required to supply the root web URL. As we perform further integration with the web app, we may be able to deprecate other similar settings, such as "status_url". Change-Id: Iaa3be10525994722d020d2aa5a7dcf141f2404d9
Diffstat (limited to 'zuul/scheduler.py')
-rw-r--r--zuul/scheduler.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/zuul/scheduler.py b/zuul/scheduler.py
index 48b035745..e5d4da5da 100644
--- a/zuul/scheduler.py
+++ b/zuul/scheduler.py
@@ -25,6 +25,7 @@ import socket
import sys
import threading
import time
+import urllib
from zuul import configloader
from zuul import model
@@ -330,6 +331,10 @@ class Scheduler(threading.Thread):
if self.config.has_option('scheduler', 'relative_priority'):
if self.config.getboolean('scheduler', 'relative_priority'):
self.use_relative_priority = True
+ web_root = get_default(self.config, 'web', 'root', None)
+ if web_root:
+ web_root = urllib.parse.urljoin(web_root, 't/{tenant.name}/')
+ self.web_root = web_root
default_ansible_version = get_default(
self.config, 'scheduler', 'default_ansible_version', None)