Hands-On Lab with Gerrit and Jenkins Q & A

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:

SCM

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: http://www.collab.net/deploy). 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!

Tagged with: , , ,
Posted in Git, TeamForge

Leave a Reply

Your email address will not be published. Required fields are marked *

*

CAPTCHA Image

*

connect with CollabNet
   Contact Us
Subscribe

Have new blog posts sent directly to your email.

looking for something
conversations

CollabNet: Make sure to come say hi at Booth 1004 at @interop: today! https://t.co/6hBwclkS8d @Flint_Brenton: https://t.co/oaiR84dDiH
Date: 4 May 2016 | 4:43 pm

CollabNet: #.ICYMI: We hosted a #Federal User Conference last week - read some highlights in @e_robertson16's: blog: https://t.co/gzCqrXGOFy @Carahsoft:
Date: 4 May 2016 | 4:40 pm

CollabNet: Make sure to come see us at @interop: at Booth 1004 to learn more about #TeamForge! https://t.co/6hBwclkS8d
Date: 4 May 2016 | 4:00 pm