I've been writing about Gerrit and Jenkins/Hudson for some time now, and I've posted a couple of screencasts for Java developers and for iOS developers as well. I've also been promising to write about how to set this up, so you can replicate the goodness of the screencast in your own work location and help spread the word.
That day has finally come, and the article is available at InfoQ under http://www.infoq.com/articles/Gerrit-jenkins-hudson, which should take you through all the steps you need to in order to replicate the experiment.
I've deliberately used the term Jenkins/Hudson throughout, because the technique works fine, regardless of which system you're using. I've also tested it on the latest of both Jenkins and Hudson, as well as the recently-released Gerrit.
A couple of changes are worth pointing out:
- Gerrit is migrating data from an SQL database to using Git notes for storing review information. The 2.1.x and 2.2.x differ in this regard; and as such, so do the permissioning screens.
- Gerrit 2.2.1 (and 220.127.116.11) have renamed the “All Projects” project from “--+All+Projects+--” to “All-Projects”. The upgrade script will do this rename for you, but if you have any systems which refer to this by name (or URLs in an article... :-) then you have to change them to reflect that.
- There was an issue with Hudson 2.0.0 with the latest Gerrit-Trigger, which is fixed with to 2.0.1
- Gerrit's JSON API changed between 2.1.6 → 2.1.7, and has now been reverted in 18.104.22.168 (and similarly, 2.2.0 → 2.2.1). This may cause some minor knock-on consequences with the Gerrit Trigger and/or Gerrit Mylyn review.
I hope that the article is useful. Any feedback/comments, feel free to add them at the InfoQ article, comments on here, or tweeting me about it.