Skip to main content
Enterprise Agile Planning Image

This post is from the CollabNet VersionOne blog and has not been updated since the original publish date.

Last Updated Feb 19, 2013 — Enterprise Agile Planning expert

Hands-On Lab with Gerrit and Jenkins Q & A

Enterprise Agile Planning

CollabNet kicked off the new year with a 3 part series called Go Agile with Git on January 15, 2013. (Tweet This!) This series is designed as a crash-course on managing Git workflows and continuous branching and merging in Agile software development, then explores the power of code review with Gerrit and Jenkins. The final installment of the series was a step-by-step demo of the Code-Review tool. Thank you to everyone that attended, but if we missed you please register for the on-demand replay. The first two installments of this series on Git workflows, branching, and merging and Peer Programming are also available!

Our guest presenter, Luca Milanesio, is pleased to elaborate on all questions and comments from the webinar. Luca is Director and cofounder of GerritForge LLP, key technology partner of CollabNet, and has over 20 years of experience in development management, software configuration management and software development lifecycle management in large enterprises worldwide.

Here is the complete log of questions and answers by Luca:

NOTE: We invite you to comment on this blog by posting your additional questions and will be happy to answer them.

Q: Is refs/for/master branch created for each user by Gerrit?

A: Gerrit automatically manages the “refs/for/<target-branch>” logical branches (not real branches on Git Server). Whenever a commit is pushed to a “refs/for/<target-branch>”, Gerrit capture the commit and creates (or add to) a Change for review for the target-branch indicated. Different commits pushed by different users create different changes.

Q: Would you recommend using -SNAPSHOT in the POM’s version during development phase? If so, when should it be removed for prod releases?
A: Yes, it is a common and good practice to use -SNAPSHOT suffix for labeling Maven artifacts that are still in development. On stable branches however it is recommended to edit (possibly via scripting) all the pom.xml and use a final version number, without the -SNAPSHOT suffix.

Q: Is it possible to share the job configurations from Jenkins?
A: Jenkins has been integrated with Gerrit using the Git Plugin Ver. 1.1.18 plus Gerrit Trigger Plugin Ver. 2.5.2; Gerrit configuration can be found in the global Jenkins configuration screen:

gerrit button

Gerrit Trigger contains the SSH details to connect from Jenkins to Gerrit Server (gitent and /home/gitent are the CollabNet TeamForge 6.2 user and user home directory under which Jenkins CI is running on):

gerrit server

Jenkins Job configuration / Git settings, needed to instruct the Git plugin on the ref-spec and branch to clone when a new Gerrit Change is pushed:


Git plugin advanced options are specified:
1) wipe out the workspace before build (as changes could be taken from completely different branches every time)
2) Trigger a build from Gerrit events / changes.

Gerrit Trigger

Gerrit Trigger settings on the Jenkins Job:

Gerrit Trigger

Q: Is the amend command part of Git? Can it be done via Eclipse or some other IDE?
A: The “–amend” option allows to edit the last commit objects in HEAD. E-Git (Eclipse Git plugin) allows you to amend using a specific icon on the top-right corner of the commit window.

Commit Changes to Git Repository

Q: What code deployment tools are recommended with Git/Gerrit/Jenkin TeamForge solution?
A: CollabNet recommends CollabNet Deploy with UC4 (See: Please contact us for a demo.

Thank you, again for attending and stay tuned as new Webinars and training material on Git and Gerrit are coming soon!

More from the Blog

View more
Jul 27, 2021 Becomes First to Achieve FedRAMP Moderate “In Process” Status for Enterprise Agile Planning Solution

Enterprise Agile Planning, the leading AI-driven DevOps value stream delivery, and ma ...
Read More
Jun 21, 2021

How Agile can be implemented effectively across the organization

Enterprise Agile Planning
Just a few decades ago, a “disruption” was seen as an undesirable thin ...
Read More
May 31, 2021

Agile change management processes are key to delivering software faster

Enterprise Agile Planning
With its emphasis on delivery value faster, agile product management s ...
Read More
May 03, 2021

Bringing the agile planning approach to your whole business

Enterprise Agile Planning
The events of the last 12 months have demonstrated that the only sure ...
Read More
Contact Us