Saturday, August 17, 2013

Git, Jenkins, Gerrit, Code Review and pre-tested commits

This post is a note to myself. There are bunch of tools on the market which can be successfully used in yours development process. But, I'm interested in gitJenkins only. Also, git/jenkins supports tons on different workflows, but here I'd like to talk about pre-tested commits.

So, what does it mean "pre-tested commit"? Initially this type of commits was introduced in TeamCity CI Server:
Typically, your team submits code to Version Control BEFORE verifying that it works, and risks breaking the build every single time — causing more problems than necessary. [2]

But, it's TeamCity and we need similar functionality in Jenkins.

There are several ways to get it:
  • Implement Jenkins plugin which can work with integration branches and simulate pre-tested workflow
  • Reuse existing tool like Gerrit
But you say Gerrit is a code review tool. And you are right. Fortunately, Gerrit support pre-tested commit in his code review workflows (see source [3]):

Gerrit Code Review represents a step-forward in the way the team work on the code and share idea and the ownership of the design and coding decisions.  (see [4])
 Tools required to support this workflow:

 To see all these in action I've added two videos which demonstrate this concept:

Also, it worth to review this slides. Here is nicely demonstrated why Gerrit is cool and why un-tested commit is bad.

  1. Pretested commits – why does it matter to us?
  2. Pre-Tested Commit: No broken code in your version control. Ever.
  3. TeamForge Git /Gerrit Integration with Jenkins CI
  4. Jenkins CI and Gerrit Code Review dance together
  5. Jeknins - Designing pre-tested commit
  6. Open Stack - Gerrit Workflow
  7. Open Stack - Gerrit Jenkins Github

No comments:

Post a Comment