Option to start headless Gerrit daemon
Add --headless option to the Daemon which will start Gerrit daemon without the Web UI front end (headless mode). This may be useful for running Gerrit server with an alternative (rest based) UI or when starting Gerrit server for the purpose of automated REST/SSH based testing. Currently this option is only supported via the --headless option of the daemon program. We would need to introduce a config option in order to support this feature for deployed war mode. Change-Id: If45d34dadbcc9c807132ca6c5901aba26d094158 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import static com.google.inject.Scopes.SINGLETON;
|
||||
import static com.google.inject.Stage.PRODUCTION;
|
||||
|
||||
import com.google.gerrit.common.ChangeHookRunner;
|
||||
import com.google.gerrit.httpd.GerritUiOptions;
|
||||
import com.google.gerrit.httpd.auth.openid.OpenIdModule;
|
||||
import com.google.gerrit.httpd.plugins.HttpPluginModule;
|
||||
import com.google.gerrit.lifecycle.LifecycleManager;
|
||||
@@ -241,6 +242,12 @@ public class WebAppInitializer extends GuiceServletContextListener {
|
||||
});
|
||||
modules.add(SshKeyCacheImpl.module());
|
||||
modules.add(new MasterNodeStartup());
|
||||
modules.add(new AbstractModule() {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(GerritUiOptions.class).toInstance(new GerritUiOptions(false));
|
||||
}
|
||||
});
|
||||
return cfgInjector.createChildInjector(modules);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user