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:

gerritconfiguration Hands On Lab with Gerrit and Jenkins Q & A

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):

gerritserver Hands On Lab with Gerrit and Jenkins Q & A

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:

sourcecodemanagement Hands On Lab with Gerrit and Jenkins Q & A

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.

gerrittrigger Hands On Lab with Gerrit and Jenkins Q & A

Gerrit Trigger settings on the Jenkins Job:

BuildTrigger Hands On Lab with Gerrit and Jenkins Q & A

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.

CommitChangestoGit 1024x231 Hands On Lab with Gerrit and Jenkins Q & A

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

connect with CollabNet
sign up for emails
looking for something
conversations

CollabNet: Certified #Scrum Master Course in Chicago Apr 28-29! Register today! http://t.co/q4ddQE3DuR
Date: 23 April 2014 | 5:48 pm

CollabNet: Don't forget to register for our upcoming Certified #Scrum Master Course in Baltimore, MD! Apr 28-29 http://t.co/MJTfBMRAz9
Date: 22 April 2014 | 10:30 pm

CollabNet: Register today! How the Government is Utilizing Open Source Webcast Series http://t.co/gQ89IyrsvM Thursday – April 24th, 2014 – 2:00pm ET
Date: 21 April 2014 | 10:15 pm