[OpenStack-Infra] A tool for slurping gerrit changes in to bug updates
Matthew Treinish
mtreinish at kortar.org
Thu May 26 16:54:49 UTC 2016
On Wed, May 25, 2016 at 10:08:57PM -0400, Matthew Treinish wrote:
> On Wed, May 25, 2016 at 02:43:36PM -0400, Sean Dague wrote:
> > On 05/25/2016 01:54 PM, Spencer Krum wrote:
> > >
> > > When working on a previous project, Nikki wrote this tool as a general
> > > purpose hook into gerrit:
> > >
> > > https://github.com/notnownikki/zoidberg
> > >
> > > I don't think she is actively maintaining or using it right now though.
> >
> > One thing I've been thinking a bit about is whether the event stream
> > could get into something like MQTT easily. In completely unrelated
> > activities (https://home-assistant.io/) I've been playing with mosquitto
> > (http://mosquitto.org/) quite a bit, and the ease of consumption of mqtt
> > is quite nice. (You can even do it straight in javascript for web based
> > things).
>
> It looked like this would be a fun little side project to experiment with, so I
> took a bit of time and wrote:
>
> https://github.com/mtreinish/germqtt
>
> It's still kinda rough and basic. For right now all it does is publishes a json
> blob of every event from the gerrit stream over mqtt. But, if it's something we
> wanted to continue with it's a good starting point.
>
Just a quick follow-up I started running this on a throwaway server at
15.184.138.236. So you can subscribe to events from gerrit. Using the
mosquitto_sub command [1] is a simple way to play with it. For example:
$ mosquitto_sub --topic 'gerrit/#' -h 15.184.138.236
will subscribe to all events
$ mosquitto_sub --topic 'gerrit/openstack/nova/#' -h 15.184.138.236
will subscribe to all nova events
$ mosquitto_sub --topic 'gerrit/+/+/comment-added' -h 15.184.138.236
will subscribe to all comment-added events. You can come up with any whatever
subscriptions you want using the builtin wildcards on the protocol. [2]
I'll probably keep the server running for a while, so feel free to play around
with it.
-Matt Treinish
[1] http://mosquitto.org/man/mosquitto_sub-1.html
[2] http://mosquitto.org/man/mqtt-7.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-infra/attachments/20160526/c332c2e5/attachment.pgp>
More information about the OpenStack-Infra
mailing list