tag | 0bcf2058d7181c30004dc0f1471a368e02c09ea9 | |
---|---|---|
tagger | Luca Milanesio <luca.milanesio@gmail.com> | Wed Jul 18 22:01:47 2018 +0100 |
object | 1fdb89dff9bef1588dbe8f49d4cc40cbf4d45513 |
Release for Gerrit v2.15.3
commit | 1fdb89dff9bef1588dbe8f49d4cc40cbf4d45513 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Wed May 03 20:53:02 2017 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Wed May 03 21:32:27 2017 +0100 |
tree | ee0c74c5f97e515a2cdf0fc245a76e0338650e4c |
Initial commit
Plugin to provide an out-of-the-box redirect for a fresh Gerrit install
When preparing a native packaging of Gerrit Code Review, the initial “out of the box” experience is necessary.
At the very first access to Gerrit UX, the browser gets redirected to a pre-configured URL which typically points to an introduction page.
Create a symbolic link to the out-of-the-box repository from the Gerrit source code /plugins directory to the subdirectories of this project.
Then build the out-of-the-box plugin with the usual Gerrit plugin compile command.
Example:
$ git clone https://github.com/GerritForge/out-of-the-box $ git clone https://gerrit.googlesource.com/gerrit $ cd gerrit/plugins $ ln -s ../../out-of-the-box . $ cd .. $ bazel build plugins/out-of-the-box
This plugin needs to be located in the Gerrit /lib directory and can be configured from the gerrit.config httpd directory as additional servlet filter in the httpd.filterClass setting.
The URL for the initial redirection URL is then configured in the http.firstTimeRedirectUrl setting.
Example gerrit.config:
[httpd] filterClass = com.googlesource.gerrit.plugins.manager.FirstTimeRedirect firstTimeRedirectUrl = https://mycompany.com/gerrit-intro.html
NOTE: The redirection happens only ONCE at the very first access to Gerrit UX. After that a flag file gets create under $GERRIT_SITE directory (.firstTimeRedirect) and the redirection filter will not be effective anymore.