Bazel: Add workspace file for in gerrit tree build

Append the content of WORKSPACE.in_gerrit_tree file to WORKSPACE file
in gerrit tree to build this plugin in gerrit tree mode:

  cd plugins/
  ln -s ../../gerrit-oauth-provider .
  cat ../gerrit-oauth-provider/WORKSPACE.in_gerrit_tree >> WORKSPACE
  bazel build plugins/gerrit-oauth-provider
  INFO: Found 1 target...
Target //plugins/gerrit-oauth-provider:gerrit-oauth-provider up-to-date:
  bazel-genfiles/plugins/gerrit-oauth-provider/gerrit-oauth-provider.jar
INFO: Elapsed time: 0.652s, Critical Path: 0.52s

Change-Id: Ie351478dfb7846659f161d9c8de672319cb3fa47
1 file changed
tree: 8ebe36c8926fd3f46b940b08b4ba7842991fa209
  1. src/
  2. tools/
  3. .gitignore
  4. .travis.yml
  5. bazlets.bzl
  6. BUILD
  7. LICENSE
  8. LICENSE-scribe
  9. README.md
  10. WORKSPACE
  11. WORKSPACE.in_gerrit_tree
README.md

Gerrit OAuth2 authentication provider

Build Status

With this plugin Gerrit can use OAuth2 protocol for authentication. Supported OAuth providers:

See the Wiki what it can do for you.

Prebuilt artifacts

Prebuilt binary artifacts are available on release page. Make sure to pick the right JAR for your Gerrit version.

Build

The plugin can be bulit with Buck and Bazel. To build the plugin with Buck, install Buck and run the following:

  git clone --recursive https://github.com/davido/gerrit-oauth-provider.git
  cd gerrit-oauth-provider && buck build plugin

To build the plugin with Bazel, install Bazel and run the following:

  bazel build gerrit-oauth-provider

Install

Copy the buck-out/gen/gerrit-oauth-provider.jar wenn built with Buck or bazel-genfiles/gerrit-oauth-provider.jar wenn built with Bazel to $gerit_site/plugins and re-run init to configure it:

  java -jar gerrit.war init -d <site>
  [...]
  *** OAuth Authentication Provider
  ***
  Use Bitbucket OAuth provider for Gerrit login ? [Y/n]? n
  Use Google OAuth provider for Gerrit login ? [Y/n]?
  Application client id          : <client-id>
  Application client secret      : 
                confirm password : 
  Link to OpenID accounts? [true]: 
  Use GitHub OAuth provider for Gerrit login ? [Y/n]? n

Reporting bugs

Make sure to read the FAQ before reporting issues.

License

Apache License 2.0