Skip to main content
Enterprise Agile Planning icon with arrows

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 Government Cloud
Apr 12, 2022 Government Cloud receives FedRAMP Authorization through sponsorship from the United States Department of Veterans Affairs

Enterprise Agile Planning
Flagship Agility solutions can effectively scale agile deve ...
Read More
Nov 22, 2021

What are the qualities of highly effective agile teams?

Enterprise Agile Planning
A team is the core unit of productivity in an agile organization. Wher ...
Read More
Nov 15, 2021

How an open-first attitude revolutionized government tech development

Enterprise Agile Planning
Public perception of government is often that it is slow-moving, reluc ...
Read More
cross functional
Nov 08, 2021

6 best practices for building resilient cross-functional teams

Enterprise Agile Planning
Agile frameworks prize the quality of resilience within every facet of ...
Read More
Contact Us