How Gerrit fits in LibreOffice CI Infrastructure

As you may know, LibreOffice undergoes currently migration to code review system gerrit. In his post to dev ML Why Gerrit and other consideration Norbert Thiebaud explained the objectives which the initiators of that move are trying to achieve. As though by chance, the first reason behind that move was cit.

a/ Allow dev to pre-build commit on a variety of platform _before_
pushing them to master. iow check and push rather than the current
push and fix. [...]

To see how gerrit fits in current LibreOffice CI picture or what should be done for it let us first take a look at the situation prior to gerrit migration. At the moment there are 23 Tinderboxes (TB), that independently running on donated machines and asynchronously verify different git branches. They upload the build results to the master TB per mail. Master TB extracts the log from the mail and puts it to the web site for that specific branch, i.e. for master you can find it here.

Setting IRC gerrit bot for LibreOffice project

LibreOffice project is migrating currently to gerrit code review system. While gerrit provides mail channel out of the box, to install IRC gerrit bot to get notified on all or some gerrit events you are on your own. Thankfully OpenStack project comes to rescue, they have created and extracted simple yet very powerful multi project and multi channel gerritbot. It has 3 prerequisites:

  • python-daemon
  • python-yaml
  • irc

To be configured it needs two files: one for gerrit and IRC configuration and one for mapping of multiple IRC channels to gerrit events. Sample for gerritbot.cfg file:


[ircbot]
nick=myIRCgerritBot
pass=
server=irc.freenode.net
port=6667
channel_config=/home/gerrit2/bot/channel.yaml

[gerrit]
user=gerritbot
key=/home/gerrit2/.ssh/id_rsa
host=gerrit.libreoffice.org
port=29418