Working with Gerrit (For Administrators)

This guide covers core administrator workflows for Wharby tenant instances, including installing custom plugins, configuring repository access rights, and setting up CI webhooks.


1. Installing Custom Gerrit Plugins

Wharby includes pre-packaged core plugins (oauth, download-commands, webhooks, code-owners, commit-message-length-validator, checks, avatars-external, replication).

Dynamic JAR Plugin Installation

Wharby allows administrators to upload custom Gerrit .jar plugins directly into their tenant's persistent site storage:

  1. Build or download your Gerrit 3.x compatible .jar plugin file (e.g. my-custom-plugin.jar).
  2. Navigate to your tenant settings portal: https://<workspaceId>.wharby.dev/settings/plugins.
  3. Upload the .jar bundle to your tenant's site/plugins/ directory.
  4. Wharby dynamically loads the plugin without dropping active SSH connections or interrupting in-flight code reviews.

2. Project Access Controls & Permissions

Gerrit manages repository permissions via special refs/meta/config branches in NoteDb:

To edit access rules, open your project in Gerrit, select Access, and click Edit. Changes to permissions are themselves tracked as Gerrit review changes!


3. Webhooks & CI Integration

Wharby supports outbound event webhooks to trigger external CI pipelines (CircleCI, GitHub Actions, Buildkite, Jenkins):

  1. In Gerrit, navigate to Project > Webhooks.
  2. Configure your target endpoint URL and secret token.
  3. Select desired event streams:
    • patchset-created: Fired whenever a developer pushes a new commit or revision.
    • comment-added: Fired when a reviewer posts comments or votes.
    • change-merged: Fired when a change is submitted and merged.

When CI completes, runners post results back using Wharby's Checks API to update the Verified +1 status.