From 70c1cdfd8f34472761fe5ec97f0713990c1b4f5b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 5 Sep 2018 21:23:41 +0300 Subject: Add multi-tenancy support --- mod/build-config.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mod/build-config.cxx') diff --git a/mod/build-config.cxx b/mod/build-config.cxx index 4913555..e838a59 100644 --- a/mod/build-config.cxx +++ b/mod/build-config.cxx @@ -14,6 +14,8 @@ #include +#include + namespace brep { using namespace std; @@ -117,7 +119,7 @@ namespace brep // needs to be url-encoded, and only in the query part of the URL. We embed // the package version into the URL path part and so don't encode it. // - string url (host + root.representation () + + string url (host + tenant_dir (root, b.tenant).representation () + mime_url_encode (b.package_name.string (), false) + '/' + b.package_version.string () + "/log/" + mime_url_encode (b.configuration, false) + '/' + @@ -140,7 +142,7 @@ namespace brep // we embed the package version into the URL query part, where it is not // encoded by design. // - return host + root.string () + + return host + tenant_dir (root, b.tenant).string () + "?build-force&pn=" + mime_url_encode (b.package_name.string ()) + "&pv=" + b.package_version.string () + "&cf=" + mime_url_encode (b.configuration) + @@ -148,7 +150,8 @@ namespace brep } bool - match (const string& config_pattern, const optional& target_pattern, + match (const string& config_pattern, + const optional& target_pattern, const build_config& c) { return path_match (config_pattern, c.name) && -- cgit v1.1