commit | 30f580eb8251c26263a99dc9e94e645ddc8c25d4 | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Tue Jun 13 07:33:11 2023 +0200 |
committer | David Ostrovsky <david@ostrovsky.org> | Tue Jun 13 07:33:14 2023 +0200 |
tree | e20f70ec2407b45e3d428b9edae711dbf51cab46 | |
parent | 46e9112a27e5a41f6703371ebf3ee57466343426 [diff] |
Format source code using google-java-format To follow the java style used by gerrit core and the majority of gerrit plugins, format the code using google-java-format version 1.7. Change-Id: I5724e766eda231b064030c11a167ff3768d2c247
Gerrit lib module to split the projects' space into virtual hosts similarly of what you would do with an HTTP Server and different domain names.
Build this module as it was a Gerrit plugin:
virtualhost
directory to Gerrit /plugins/virtualhost
bazel build plugins/virtualhost
virtualhost.jar
module is generated under /bazel-genfiles/plugins/virtualhost/
Copy virtualhost.jar
library to Gerrit /lib
and add the following two extra settings to gerrit.config
:
[gerrit] installModule = com.gerritforge.gerrit.modules.virtualhost.GuiceModule [httpd] filterClass = com.gerritforge.gerrit.modules.virtualhost.VirtualHostFilter
/etc/virtualhost.config contains the definition of the virtual hosts and the set of projects included.
Each server
section defines a virtual host and contains a set of projects included. Projects are defined using Gerrit ref-matching expressions and can be repeated multiple times to include multiple matchers.
Example to include all the projects starting with team1/
and the ones starting with the username:
[server "team1.mycompany.com"] projects = team1/* projects = ${username}/*
For all the other server names that are not defined and for SSH access, there is a special default section that lists of visible projects.
Example to include all the projects by default:
[default] projects = ^.*