Gerrit integration


We would like to integrate Buildkite with our Gerrit setup. We’re wondering if Buildkite has any tools to make this integration as smooth as possible?

Hi @valerium ,

We don’t have a direct integration for Gerrit, so you would have to build a bridge yourself. From what I understand, Gerrit uses webhooks. One way to intercept Gerrit webhooks is to use our REST API or Amazon EventBridge:

One particularity of Gerrit is that its webhook sends git references instead of branches which is more common for other git hosts. Any reference will work fine for the build’s commit. Branch is still required, but ultimately arbitrary – the agent will use the supplied ref when it wants to fetch things – I imagine the target branch would be the best fit. The branch is used for branch-filtering constraints, as the BUILDKITE_BRANCH environment variable inside the build, and to group “related” builds in the UI.

I hope that helps!

Austin posted an open source example for a Gerrit-Buildkite integration here: