Add support for specifying a tenant explicitly
OpenStack white-labels the dashboard specifically at the OpenStack level, but there are some URLs, like the github connection payload webhook receiver, that are global and not per-tenant. It's conceivable that we might want to add richer support for single-tenant whitelabels as well. Change-Id: I03ea09e86168ed4e896f74db1b715131ad61f600
This commit is contained in:
parent
5c759a128d
commit
eb2a5f81b1
|
@ -89,6 +89,7 @@ class zuul (
|
|||
$zuul_web_url = 'http://127.0.0.1:9000',
|
||||
$zuul_scheduler_url = 'http://127.0.0.1:8001',
|
||||
$site_variables_yaml_file = undef,
|
||||
$zuul_tenant_name = undef,
|
||||
) {
|
||||
include ::httpd
|
||||
include ::pip
|
||||
|
@ -104,6 +105,12 @@ class zuul (
|
|||
$pip_command = 'pip'
|
||||
}
|
||||
|
||||
if ($zuul_tenant_name) {
|
||||
$zuul_web_full_url = "${zuul_web_url}/${zuul_tenant_name}"
|
||||
} else {
|
||||
$zuul_web_full_url = $zuul_web_url
|
||||
}
|
||||
|
||||
$packages = [
|
||||
'libffi-dev',
|
||||
'libssl-dev',
|
||||
|
|
|
@ -41,16 +41,16 @@
|
|||
|
||||
<% if @zuulv3 %>
|
||||
RewriteRule ^/connection/(.*) <%= @zuul_web_url %>/connection/$1 [P]
|
||||
RewriteRule ^/status.json <%= @zuul_web_url %>/status.json [P]
|
||||
RewriteRule ^/status.html <%= @zuul_web_url %>/status.html [P]
|
||||
RewriteRule ^/jobs.json <%= @zuul_web_url %>/jobs.json [P]
|
||||
RewriteRule ^/jobs.html <%= @zuul_web_url %>/jobs.html [P]
|
||||
RewriteRule ^/builds.json <%= @zuul_web_url %>/builds.json [P]
|
||||
RewriteRule ^/builds.html <%= @zuul_web_url %>/builds.html [P]
|
||||
RewriteRule ^/console-stream <%= @zuul_web_url.sub('http://', 'ws://') %>/console-stream [P]
|
||||
RewriteRule ^/stream.html <%= @zuul_web_url %>/stream.html [P]
|
||||
RewriteRule ^/(.*).pub$ <%= @zuul_web_url %>/$1.pub [P]
|
||||
RewriteRule ^/$ <%= @zuul_web_url %>/status.html [P]
|
||||
RewriteRule ^/status.json <%= @zuul_web_full_url %>/status.json [P]
|
||||
RewriteRule ^/status.html <%= @zuul_web_full_url %>/status.html [P]
|
||||
RewriteRule ^/jobs.json <%= @zuul_web_full_url %>/jobs.json [P]
|
||||
RewriteRule ^/jobs.html <%= @zuul_web_full_url %>/jobs.html [P]
|
||||
RewriteRule ^/builds.json <%= @zuul_web_full_url %>/builds.json [P]
|
||||
RewriteRule ^/builds.html <%= @zuul_web_full_url %>/builds.html [P]
|
||||
RewriteRule ^/console-stream <%= @zuul_web_full_url.sub('http://', 'ws://') %>/console-stream [P]
|
||||
RewriteRule ^/stream.html <%= @zuul_web_full_url %>/stream.html [P]
|
||||
RewriteRule ^/(.*).pub$ <%= @zuul_web_full_url %>/$1.pub [P]
|
||||
RewriteRule ^/$ <%= @zuul_web_full_url %>/status.html [P]
|
||||
<% end %>
|
||||
|
||||
AddOutputFilterByType DEFLATE application/json
|
||||
|
@ -122,16 +122,16 @@
|
|||
|
||||
<% if @zuulv3 %>
|
||||
RewriteRule ^/connection/(.*) <%= @zuul_web_url %>/connection/$1 [P]
|
||||
RewriteRule ^/status.json <%= @zuul_web_url %>/status.json [P]
|
||||
RewriteRule ^/status.html <%= @zuul_web_url %>/status.html [P]
|
||||
RewriteRule ^/jobs.json <%= @zuul_web_url %>/jobs.json [P]
|
||||
RewriteRule ^/jobs.html <%= @zuul_web_url %>/jobs.html [P]
|
||||
RewriteRule ^/builds.json <%= @zuul_web_url %>/builds.json [P]
|
||||
RewriteRule ^/builds.html <%= @zuul_web_url %>/builds.html [P]
|
||||
RewriteRule ^/console-stream <%= @zuul_web_url.sub('http://', 'ws://') %>/console-stream [P]
|
||||
RewriteRule ^/stream.html <%= @zuul_web_url %>/stream.html [P]
|
||||
RewriteRule ^/(.*).pub$ <%= @zuul_web_url %>/$1.pub [P]
|
||||
RewriteRule ^/$ <%= @zuul_web_url %>/status.html [P]
|
||||
RewriteRule ^/status.json <%= @zuul_web_full_url %>/status.json [P]
|
||||
RewriteRule ^/status.html <%= @zuul_web_full_url %>/status.html [P]
|
||||
RewriteRule ^/jobs.json <%= @zuul_web_full_url %>/jobs.json [P]
|
||||
RewriteRule ^/jobs.html <%= @zuul_web_full_url %>/jobs.html [P]
|
||||
RewriteRule ^/builds.json <%= @zuul_web_full_url %>/builds.json [P]
|
||||
RewriteRule ^/builds.html <%= @zuul_web_full_url %>/builds.html [P]
|
||||
RewriteRule ^/console-stream <%= @zuul_web_full_url.sub('http://', 'ws://') %>/console-stream [P]
|
||||
RewriteRule ^/stream.html <%= @zuul_web_full_url %>/stream.html [P]
|
||||
RewriteRule ^/(.*).pub$ <%= @zuul_web_full_url %>/$1.pub [P]
|
||||
RewriteRule ^/$ <%= @zuul_web_full_url %>/status.html [P]
|
||||
<% end %>
|
||||
|
||||
AddOutputFilterByType DEFLATE application/json
|
||||
|
|
Loading…
Reference in New Issue