SlideShare a Scribd company logo
1 of 45
Download to read offline
Main sponsor




  Gerrit
Luca Milanesio
Who’s that guy ?




review.GerritForge™.com   Copyright © 2012 – LMIT Software
Agenda

  •   Agile and the broken build dilemma
  •   Can Git solve it ?
  •   “Agile” workflow with Git
  •   Gerrit: the smart way
  •   Just about code-review ?
  •   Let’s play with Gerrit live !



review.GerritForge™.com      Copyright © 2012 – LMIT Software
Agile and continuous integration

  • Who is using CI ? … raise your hand !!!!

  • Good or bad ?


  •Why ?



review.GerritForge™.com      Copyright © 2012 – LMIT Software
Continuous Integration is GOOD

  •   Live “weather forecast” of the project
  •   Detect and resolve conflicts earlier
  •   Bring TDD to life
  •   Enforce collective code ownership
  •   … and much more




review.GerritForge™.com       Copyright © 2012 – LMIT Software
Breaking the build id BAD !

  • All devs gets tests broken
  • Build stops
  • Test are NOT executed



  … all team goes at “DEFCON1”
  to fix it ASAP !!


review.GerritForge™.com      Copyright © 2012 – LMIT Software
Broken build dilemma: how to avoid it ?


         1. Do not PUSH until you’re 100% sure
            of GREEN bar
         2. Create multiple personal CI builds
            and validate builds before PUSH
         3. Install a “Jenkins Build Game” plug-
            in and get free beers 

         … DO ANY OF THEM REALLY WORK ?

review.GerritForge™.com         Copyright © 2012 – LMIT Software
Git … can you help out ?

   Git short story: the anti-Subversion
   • Apr 2005 – Linus writes PERL scripts for Linux Kernel SCM
   • Jul 2005 … Git 0.99 is out !

   Git principles:
   • Continuous branching / merging / rebasing /
     stashing
   • Distributed repositories
   • Distributed patch distribution
   • Early integration
     (before breaking the CI)

review.GerritForge™.com                   Copyright © 2012 – LMIT Software
Git topic-branches workflow

                           B4             B5                 topic1



            A1        A2             A3                      master



                   C2           C3             C4            topic2


   Agile workflow – one topic branch per story
   • Keep on branch whilst RED / AMBER bar
   • Continuous rebase on master
   • Merge on GREEN bar


review.GerritForge™.com                             Copyright © 2012 – LMIT Software
Problem resolved ?

  • Let’s use Git then ?
      “My repo is the master”
                          “Git is all about peer-to-peer dev”
         “Who has reverted my commits ? … !$@#!$!”

  • Git doesn’t enforce any policy
       Peer-to-peer development allowed
       Dictatorship or anarchy of changes are both allowed

  … is there a “better Git” out there ?

review.GerritForge™.com               Copyright © 2012 – LMIT Software
Gerrit, brief history

   Google
  Mondrian
               The idea: Guido Van Rossum
                         Code-review for Perforce
                         Porting to SVN and OpenSourced
  Rietveld               Python-based
               2008 - Project fork for AOSP
                      (Shawn Pearce / Joe Onorato)
   Gerrit
  Rietveld               Name changed to Gerrit Rietveld
                         Based on Git
                         Set of “patches” on original Guido’s
                          Rietveld project
  gerrit       2009 - Gerrit 2, the Java + GWT rewriting
                      (Shawn Pearce)

review.GerritForge™.com                          Copyright © 2012 – LMIT Software
What is Gerrit today ?

  • 100% pure Java SSH and HTTP Git backend
       Powered by JGit
  • GWT Web-view administration
       Users and Groups
       Project and branch security
       Git repository browsing
  • Git repository replication engine
  • Code collaboration and review
  • Code validation through Jenkins Triggers


review.GerritForge™.com               Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                 CI Build: OK


                                                              master
         A1




review.GerritForge™.com         Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                 CI Build: OK


                                                              master
         A1




 clone



                                                                    local
      A1                                                           master



review.GerritForge™.com         Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                 CI Build: OK


                                                              master
         A1




 clone



                                                                    local
      A1         C2                                                master



review.GerritForge™.com         Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                  CI Build: OK


                                                               master
         A1




                  C2                                    refs/for/master




 clone     push



                                                                     local
      A1          C2                                                master



review.GerritForge™.com          Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                  CI Build: OK


                                                                            master
         A1

                             Verified: -1
                             (build failed)



                  C2                                                 refs/for/master




 clone     push



                                                                                  local
      A1          C2                                                             master



review.GerritForge™.com                       Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                  CI Build: OK


                                                                             master
         A1

                             Verified: -1
                             (build failed)



                  C2                     C2*                          refs/for/master




 clone     push                  push



                                                                                   local
      A1          C2                     C2*                                      master



review.GerritForge™.com                        Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                  CI Build: OK


                                                                                    master
         A1

                             Verified: -1      Verified: +1
                             (build failed)    (build OK)



                  C2                     C2*                                 refs/for/master




 clone     push                  push



                                                                                          local
      A1          C2                     C2*                                             master



review.GerritForge™.com                               Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                  CI Build: OK


                                                                                    master
         A1

                             Verified: -1      Verified: +1
                             (build failed)    (build OK)



                  C2                     C2*                                 refs/for/master
                                                              Reviewed: +2




 clone     push                  push



                                                                                          local
      A1          C2                     C2*                                             master



review.GerritForge™.com                               Copyright © 2012 – LMIT Software
Gerrit: high level workflow
                  CI Build: OK                                               CI Build: OK


                                                                                     master
         A1                                                     C2*

                             Verified: -1      Verified: +1
                             (build failed)    (build OK)



                  C2                     C2*                                   refs/for/master
                                                              Reviewed: +2




 clone     push                  push



                                                                                          local
      A1          C2                     C2*                                             master



review.GerritForge™.com                               Copyright © 2012 – LMIT Software
Cool, isn’t it ?

  • Gerrit allow “automatic” topic-branches
  • Triggers with Jenkins branch validation
  • Enforce collective code-ownership
       People “interacts” with the code changes
       Discussion on style and architecture
       Democratic voting (+1 / -1)
  • Project history
       Reason behind changes is recorded in code-review




review.GerritForge™.com              Copyright © 2012 – LMIT Software
See Gerrit “live” in action




review.GerritForge™.com         Copyright © 2012 – LMIT Software
1. Set-up

  • Option-A: download and install
      1. Download from
         http://code.google.com/p/gerrit/downloads/list
      2. Gerrit install wizard:
           java –jar gerrit-2.2.2.1.war init -d ~/gerrit
      3. Run Gerrit:
           ~/gerrit/bin/gerrit.sh start

  • Option-B: Gerrit as hosted service
       Assembla.com (free for OpenSorce projects)
       GitEnterprise.com (free up to 10 users)



review.GerritForge™.com              Copyright © 2012 – LMIT Software
2. Create user and add SSH keys

  • Option-A: not easy 
       Gerrit doesn’t support a “local user registry”
       Options: LDAP or OpenID

  • Option-B: use the provider user registration
       Assembla:
        https://www.assembla.com/signup
       GitEnterprise:
        https://gitent-scm.com/signup




review.GerritForge™.com                Copyright © 2012 – LMIT Software
3. Talk to Gerrit via SSH

  • Gerrit SSH console
       Listen at 29418 port
       Not a real SSH server (just Gerrit listening)




review.GerritForge™.com                        Copyright © 2012 – LMIT Software
4. Create a Gerrit project

 • Gerrit Project is:
      Git repository (use “path notation” to organise projects)
      Access permissions
      Code-review and change-sets
 • Option-A: use Gerrit SSH command
 $ ssh -p 29418 lmilanesio@localhost gerrit create-project
 lmit/33degree


 • Option-B: user the provider-specific page
      Assembla: N/A (only 1 project associated to your “space”)
      GitEnterprise:
       https://gitent-scm.com/newrepo



review.GerritForge™.com                       Copyright © 2012 – LMIT Software
5. Clone repo from Gerrit
  • Git SSH repository URL is:
     ssh://<user>@<host>:29418/<Gerrit project>.git




  • Gerrit supports HTTP or HTTP/S repository URL:
    http://<Gerrit URL>/p/<Gerrit project>.git




  NOTE: For HTTP authentication, put your credentials on ~/.netrc file
  machine <hostname> login <username> password <password>


review.GerritForge™.com                                 Copyright © 2012 – LMIT Software
6. Gerrit Change-Id

  • SHA-1 GUID of a change-set under review
  • MUST be last line of commit msg

         Hint: install Gerrit post-commit hook for auto-
         generating Change-Id after each Git commit




  Now all Git commit will auto-generate a Change-Id !




review.GerritForge™.com               Copyright © 2012 – LMIT Software
7. Submit a change for review

  • Change for review committed locally
  • Push to refs/for/<branch> for submitting local Git
    changes for review on <branch>




review.GerritForge™.com           Copyright © 2012 – LMIT Software
8. Verify change against CI




review.GerritForge™.com         Copyright © 2012 – LMIT Software
9. Additional patch-set to Change-Id
  • Fix the problem locally
  • Amend the commit (same Change-Id)
  • Push again to refs/for/<branch> for adding one
    extra change-set




review.GerritForge™.com           Copyright © 2012 – LMIT Software
10. Change-Id is validated against CI




                          • Request code-review
review.GerritForge™.com         Copyright © 2012 – LMIT Software
11. Review and comment changes




review.GerritForge™.com   Copyright © 2012 – LMIT Software
12. Review merge and submit change

                          • One or more
                            reviewers can “vote”
                            for the change

                          • Authorised users can
                            then “Submit” the
                            change.

                          • Change is
                            automatically merged
                            to master


review.GerritForge™.com   Copyright © 2012 – LMIT Software
13. Master build is triggered … SUCCESS !!




review.GerritForge™.com     Copyright © 2012 – LMIT Software
… is just about code-review then ?
                        GitHub   BitBucket    Gitorious               Gerrit
    SSH / HTTPS

    Free public repo

    Free private repo

    Repo security

    Branch security

    Code review

    Hooks / API

    Replication

    CI Integration

    OpenSource /
    extensible
    Issue-tracker
    integration




review.GerritForge™.com                      Copyright © 2012 – LMIT Software
Credits and resources
  • Many thanks to
      Shawn Pearce, father of Gerrit
      Its contributors and Google Inc.
  • Google Gerrit code-review
    http://code.google.com/p/gerrit/
  • Assembla Gerrit
    http://review.assembla.com
  • GitEnterprise
    http://review.gitent-scm.com
    @gitenterprise

  Slides available at http://www.slideshare.net/lucamilanesio
  Follow me: @lucamilanesio

review.GerritForge™.com                    Copyright © 2012 – LMIT Software
BACKUP




review.GerritForge™.com        Copyright © 2012 – LMIT Software
Gerrit: just code-review then ?

  • Git Security – Groups
      Define different “roles” in the project
      System groups
          • Anonymous users: use for public projects
          • Registered Users: all users
          • Administrators: to administer Gerrit
          • Project Owners: to administer projects
          • Non-interactive Users: for CI or batch operations
      Groups can be hierarchical (groups of groups)


review.GerritForge™.com                 Copyright © 2012 – LMIT Software
Define groups and members
 Admin > Groups




review.GerritForge™.com   Copyright © 2012 – LMIT Software
Putting all together with projects

  • Git Security: rights to projects
      Define access rights to Git operations
      Control the Gerrit identity vs Git author /
       committer
      Delegate project administration
      Assign code-review voting range rights
      Define who can submit and merge changes
      Organise project rights hirarchically


review.GerritForge™.com           Copyright © 2012 – LMIT Software
Define project access rights per refspec
 Admin > Projects > 33degree > Access




review.GerritForge™.com                 Copyright © 2012 – LMIT Software
Assign access rights to Groups




review.GerritForge™.com     Copyright © 2012 – LMIT Software
… and Gerrit replication
                                                         Remote
                                                        gerrit or git
                           Remote
                          gerrit or git

    Master
    gerrit




review.GerritForge™.com                   Copyright © 2012 – LMIT Software

More Related Content

What's hot

Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdfTilton2
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Simplilearn
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow IntroductionDavid Paluy
 
Git Branching for Agile Teams
Git Branching for Agile Teams Git Branching for Agile Teams
Git Branching for Agile Teams Atlassian
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICDKnoldus Inc.
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To JenkinsKnoldus Inc.
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflowsArthur Shvetsov
 
DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub ActionsNilesh Gule
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionAnwarul Islam
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsKumar Shìvam
 
Optimize your CI/CD with GitLab and AWS
Optimize your CI/CD with GitLab and AWSOptimize your CI/CD with GitLab and AWS
Optimize your CI/CD with GitLab and AWSDevOps.com
 

What's hot (20)

DevOps Overview
DevOps OverviewDevOps Overview
DevOps Overview
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
DevOps
DevOpsDevOps
DevOps
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git Branching for Agile Teams
Git Branching for Agile Teams Git Branching for Agile Teams
Git Branching for Agile Teams
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Git training v10
Git training v10Git training v10
Git training v10
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Git and GitHub workflows
Git and GitHub workflowsGit and GitHub workflows
Git and GitHub workflows
 
DevOps explained
DevOps explainedDevOps explained
DevOps explained
 
Git Rebase vs Merge
Git Rebase vs MergeGit Rebase vs Merge
Git Rebase vs Merge
 
DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub Actions
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
 
Optimize your CI/CD with GitLab and AWS
Optimize your CI/CD with GitLab and AWSOptimize your CI/CD with GitLab and AWS
Optimize your CI/CD with GitLab and AWS
 
GitOps with Gitkube
GitOps with GitkubeGitOps with Gitkube
GitOps with Gitkube
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 

Similar to Main sponsor Gerrit enables continuous integration and code reviews

Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Marrying Jenkins and Gerrit-Berlin Expert Days 2013Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Marrying Jenkins and Gerrit-Berlin Expert Days 2013Dharmesh Sheta
 
The Virtual Git Summit - Subversion to Git - A Sugar Story
The Virtual Git Summit - Subversion to Git - A Sugar StoryThe Virtual Git Summit - Subversion to Git - A Sugar Story
The Virtual Git Summit - Subversion to Git - A Sugar StoryJohn Mertic
 
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14msohn
 
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...Perforce
 
A Skeptic's Guide to Docker
A Skeptic's Guide to DockerA Skeptic's Guide to Docker
A Skeptic's Guide to DockerTori Wieldt
 
Git workflows (Basics)
Git workflows (Basics)Git workflows (Basics)
Git workflows (Basics)Roman Kuba
 
Gitlab meets Kubernetes
Gitlab meets KubernetesGitlab meets Kubernetes
Gitlab meets Kubernetesinovex GmbH
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building ToolsAkihiro Suda
 
Git architects
Git architectsGit architects
Git architectsglitchdata
 
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...NRB
 
What's new with Zend server
What's new with Zend serverWhat's new with Zend server
What's new with Zend serverCOMMON Europe
 
Webcast : Develop Mainframe Software with Open Source SCMs and IBM Dependency...
Webcast : Develop Mainframe Software with Open Source SCMs and IBM Dependency...Webcast : Develop Mainframe Software with Open Source SCMs and IBM Dependency...
Webcast : Develop Mainframe Software with Open Source SCMs and IBM Dependency...DevOps for Enterprise Systems
 
Don't Let Git Get Your Goat!
Don't Let Git Get Your Goat!Don't Let Git Get Your Goat!
Don't Let Git Get Your Goat!CollabNet
 
How We Use GitHub
How We Use GitHubHow We Use GitHub
How We Use GitHubNYC DevShop
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous DeploymentBrett Child
 
Git/Gerrit with TeamForge
Git/Gerrit with TeamForgeGit/Gerrit with TeamForge
Git/Gerrit with TeamForgeCollabNet
 
mRuby - Powerful Software for Embedded System Development
mRuby - Powerful Software for Embedded System DevelopmentmRuby - Powerful Software for Embedded System Development
mRuby - Powerful Software for Embedded System DevelopmentKazuhiro Koga 古賀一博
 
40 square's git workflow
40 square's git workflow40 square's git workflow
40 square's git workflowRuben Tan
 
Debugging embedded devices using GDB
Debugging embedded devices using GDBDebugging embedded devices using GDB
Debugging embedded devices using GDBChris Simmonds
 

Similar to Main sponsor Gerrit enables continuous integration and code reviews (20)

Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Marrying Jenkins and Gerrit-Berlin Expert Days 2013Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Marrying Jenkins and Gerrit-Berlin Expert Days 2013
 
The Virtual Git Summit - Subversion to Git - A Sugar Story
The Virtual Git Summit - Subversion to Git - A Sugar StoryThe Virtual Git Summit - Subversion to Git - A Sugar Story
The Virtual Git Summit - Subversion to Git - A Sugar Story
 
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
 
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
Compartmentalized Continuous Integration: Enabling Rapid, Flexible Collaborat...
 
A Skeptic's Guide to Docker
A Skeptic's Guide to DockerA Skeptic's Guide to Docker
A Skeptic's Guide to Docker
 
Git workflows (Basics)
Git workflows (Basics)Git workflows (Basics)
Git workflows (Basics)
 
Gitlab meets Kubernetes
Gitlab meets KubernetesGitlab meets Kubernetes
Gitlab meets Kubernetes
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building Tools
 
Git architects
Git architectsGit architects
Git architects
 
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
 
What's new with Zend server
What's new with Zend serverWhat's new with Zend server
What's new with Zend server
 
Webcast : Develop Mainframe Software with Open Source SCMs and IBM Dependency...
Webcast : Develop Mainframe Software with Open Source SCMs and IBM Dependency...Webcast : Develop Mainframe Software with Open Source SCMs and IBM Dependency...
Webcast : Develop Mainframe Software with Open Source SCMs and IBM Dependency...
 
Don't Let Git Get Your Goat!
Don't Let Git Get Your Goat!Don't Let Git Get Your Goat!
Don't Let Git Get Your Goat!
 
How We Use GitHub
How We Use GitHubHow We Use GitHub
How We Use GitHub
 
Git in Continuous Deployment
Git in Continuous DeploymentGit in Continuous Deployment
Git in Continuous Deployment
 
Application Deployment on IBM i
Application Deployment on IBM iApplication Deployment on IBM i
Application Deployment on IBM i
 
Git/Gerrit with TeamForge
Git/Gerrit with TeamForgeGit/Gerrit with TeamForge
Git/Gerrit with TeamForge
 
mRuby - Powerful Software for Embedded System Development
mRuby - Powerful Software for Embedded System DevelopmentmRuby - Powerful Software for Embedded System Development
mRuby - Powerful Software for Embedded System Development
 
40 square's git workflow
40 square's git workflow40 square's git workflow
40 square's git workflow
 
Debugging embedded devices using GDB
Debugging embedded devices using GDBDebugging embedded devices using GDB
Debugging embedded devices using GDB
 

More from Luca Milanesio

What's new in Gerrit Code Review v3.1 and beyond
What's new in Gerrit Code Review v3.1 and beyondWhat's new in Gerrit Code Review v3.1 and beyond
What's new in Gerrit Code Review v3.1 and beyondLuca Milanesio
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeLuca Milanesio
 
Cloud-native Gerrit Code Review
Cloud-native Gerrit Code ReviewCloud-native Gerrit Code Review
Cloud-native Gerrit Code ReviewLuca Milanesio
 
Gerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-stepGerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-stepLuca Milanesio
 
Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Luca Milanesio
 
ChronicleMap non-blocking cache for Gerrit v3.3
ChronicleMap non-blocking cache for Gerrit v3.3ChronicleMap non-blocking cache for Gerrit v3.3
ChronicleMap non-blocking cache for Gerrit v3.3Luca Milanesio
 
Gerrit Code Review multi-site
Gerrit Code Review multi-siteGerrit Code Review multi-site
Gerrit Code Review multi-siteLuca Milanesio
 
What's new in Gerrit Code Review 3.0
What's new in Gerrit Code Review 3.0What's new in Gerrit Code Review 3.0
What's new in Gerrit Code Review 3.0Luca Milanesio
 
Gerrit User Summit 2019 Keynote
Gerrit User Summit 2019 KeynoteGerrit User Summit 2019 Keynote
Gerrit User Summit 2019 KeynoteLuca Milanesio
 
Gerrit multi-master / multi-site at GerritHub
Gerrit multi-master / multi-site at GerritHubGerrit multi-master / multi-site at GerritHub
Gerrit multi-master / multi-site at GerritHubLuca Milanesio
 
GerritHub a true Gerrit migration story to v2.15
GerritHub a true Gerrit migration story to v2.15GerritHub a true Gerrit migration story to v2.15
GerritHub a true Gerrit migration story to v2.15Luca Milanesio
 
Gerrit User Summit 2018 - Keynote
Gerrit User Summit 2018 - Keynote Gerrit User Summit 2018 - Keynote
Gerrit User Summit 2018 - Keynote Luca Milanesio
 
Jenkins plugin for Gerrit Code Review pipelines
Jenkins plugin for Gerrit Code Review pipelinesJenkins plugin for Gerrit Code Review pipelines
Jenkins plugin for Gerrit Code Review pipelinesLuca Milanesio
 
Gerrit User Summit 2017 Keynote
Gerrit User Summit 2017 KeynoteGerrit User Summit 2017 Keynote
Gerrit User Summit 2017 KeynoteLuca Milanesio
 
How to keep Jenkins logs forever without performance issues
How to keep Jenkins logs forever without performance issuesHow to keep Jenkins logs forever without performance issues
How to keep Jenkins logs forever without performance issuesLuca Milanesio
 
Jenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeJenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeLuca Milanesio
 
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code ReviewJenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code ReviewLuca Milanesio
 
Stable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewStable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewLuca Milanesio
 
Gerrit Code Review Analytics
Gerrit Code Review AnalyticsGerrit Code Review Analytics
Gerrit Code Review AnalyticsLuca Milanesio
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeLuca Milanesio
 

More from Luca Milanesio (20)

What's new in Gerrit Code Review v3.1 and beyond
What's new in Gerrit Code Review v3.1 and beyondWhat's new in Gerrit Code Review v3.1 and beyond
What's new in Gerrit Code Review v3.1 and beyond
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source code
 
Cloud-native Gerrit Code Review
Cloud-native Gerrit Code ReviewCloud-native Gerrit Code Review
Cloud-native Gerrit Code Review
 
Gerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-stepGerrit Code Review migrations step-by-step
Gerrit Code Review migrations step-by-step
 
Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3
 
ChronicleMap non-blocking cache for Gerrit v3.3
ChronicleMap non-blocking cache for Gerrit v3.3ChronicleMap non-blocking cache for Gerrit v3.3
ChronicleMap non-blocking cache for Gerrit v3.3
 
Gerrit Code Review multi-site
Gerrit Code Review multi-siteGerrit Code Review multi-site
Gerrit Code Review multi-site
 
What's new in Gerrit Code Review 3.0
What's new in Gerrit Code Review 3.0What's new in Gerrit Code Review 3.0
What's new in Gerrit Code Review 3.0
 
Gerrit User Summit 2019 Keynote
Gerrit User Summit 2019 KeynoteGerrit User Summit 2019 Keynote
Gerrit User Summit 2019 Keynote
 
Gerrit multi-master / multi-site at GerritHub
Gerrit multi-master / multi-site at GerritHubGerrit multi-master / multi-site at GerritHub
Gerrit multi-master / multi-site at GerritHub
 
GerritHub a true Gerrit migration story to v2.15
GerritHub a true Gerrit migration story to v2.15GerritHub a true Gerrit migration story to v2.15
GerritHub a true Gerrit migration story to v2.15
 
Gerrit User Summit 2018 - Keynote
Gerrit User Summit 2018 - Keynote Gerrit User Summit 2018 - Keynote
Gerrit User Summit 2018 - Keynote
 
Jenkins plugin for Gerrit Code Review pipelines
Jenkins plugin for Gerrit Code Review pipelinesJenkins plugin for Gerrit Code Review pipelines
Jenkins plugin for Gerrit Code Review pipelines
 
Gerrit User Summit 2017 Keynote
Gerrit User Summit 2017 KeynoteGerrit User Summit 2017 Keynote
Gerrit User Summit 2017 Keynote
 
How to keep Jenkins logs forever without performance issues
How to keep Jenkins logs forever without performance issuesHow to keep Jenkins logs forever without performance issues
How to keep Jenkins logs forever without performance issues
 
Jenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle TimeJenkins Pipeline on your Local Box to Reduce Cycle Time
Jenkins Pipeline on your Local Box to Reduce Cycle Time
 
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code ReviewJenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
Jenkins world 2017 - Data-Driven CI Pipeline with Gerrit Code Review
 
Stable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewStable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code Review
 
Gerrit Code Review Analytics
Gerrit Code Review AnalyticsGerrit Code Review Analytics
Gerrit Code Review Analytics
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review Upgrade
 

Recently uploaded

MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 

Recently uploaded (20)

MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Introduction to Research ,Need for research, Need for design of Experiments, ...
Introduction to Research ,Need for research, Need for design of Experiments, ...Introduction to Research ,Need for research, Need for design of Experiments, ...
Introduction to Research ,Need for research, Need for design of Experiments, ...
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Chi-Square Test Non Parametric Test Categorical Variable
Chi-Square Test Non Parametric Test Categorical VariableChi-Square Test Non Parametric Test Categorical Variable
Chi-Square Test Non Parametric Test Categorical Variable
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 

Main sponsor Gerrit enables continuous integration and code reviews

  • 1. Main sponsor Gerrit Luca Milanesio
  • 2. Who’s that guy ? review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 3. Agenda • Agile and the broken build dilemma • Can Git solve it ? • “Agile” workflow with Git • Gerrit: the smart way • Just about code-review ? • Let’s play with Gerrit live ! review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 4. Agile and continuous integration • Who is using CI ? … raise your hand !!!! • Good or bad ? •Why ? review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 5. Continuous Integration is GOOD • Live “weather forecast” of the project • Detect and resolve conflicts earlier • Bring TDD to life • Enforce collective code ownership • … and much more review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 6. Breaking the build id BAD ! • All devs gets tests broken • Build stops • Test are NOT executed … all team goes at “DEFCON1” to fix it ASAP !! review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 7. Broken build dilemma: how to avoid it ? 1. Do not PUSH until you’re 100% sure of GREEN bar 2. Create multiple personal CI builds and validate builds before PUSH 3. Install a “Jenkins Build Game” plug- in and get free beers  … DO ANY OF THEM REALLY WORK ? review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 8. Git … can you help out ? Git short story: the anti-Subversion • Apr 2005 – Linus writes PERL scripts for Linux Kernel SCM • Jul 2005 … Git 0.99 is out ! Git principles: • Continuous branching / merging / rebasing / stashing • Distributed repositories • Distributed patch distribution • Early integration (before breaking the CI) review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 9. Git topic-branches workflow B4 B5 topic1 A1 A2 A3 master C2 C3 C4 topic2 Agile workflow – one topic branch per story • Keep on branch whilst RED / AMBER bar • Continuous rebase on master • Merge on GREEN bar review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 10. Problem resolved ? • Let’s use Git then ? “My repo is the master” “Git is all about peer-to-peer dev” “Who has reverted my commits ? … !$@#!$!” • Git doesn’t enforce any policy  Peer-to-peer development allowed  Dictatorship or anarchy of changes are both allowed … is there a “better Git” out there ? review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 11. Gerrit, brief history Google Mondrian The idea: Guido Van Rossum  Code-review for Perforce  Porting to SVN and OpenSourced Rietveld  Python-based 2008 - Project fork for AOSP (Shawn Pearce / Joe Onorato) Gerrit Rietveld  Name changed to Gerrit Rietveld  Based on Git  Set of “patches” on original Guido’s Rietveld project gerrit 2009 - Gerrit 2, the Java + GWT rewriting (Shawn Pearce) review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 12. What is Gerrit today ? • 100% pure Java SSH and HTTP Git backend  Powered by JGit • GWT Web-view administration  Users and Groups  Project and branch security  Git repository browsing • Git repository replication engine • Code collaboration and review • Code validation through Jenkins Triggers review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 13. Gerrit: high level workflow CI Build: OK master A1 review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 14. Gerrit: high level workflow CI Build: OK master A1 clone local A1 master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 15. Gerrit: high level workflow CI Build: OK master A1 clone local A1 C2 master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 16. Gerrit: high level workflow CI Build: OK master A1 C2 refs/for/master clone push local A1 C2 master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 17. Gerrit: high level workflow CI Build: OK master A1 Verified: -1 (build failed) C2 refs/for/master clone push local A1 C2 master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 18. Gerrit: high level workflow CI Build: OK master A1 Verified: -1 (build failed) C2 C2* refs/for/master clone push push local A1 C2 C2* master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 19. Gerrit: high level workflow CI Build: OK master A1 Verified: -1 Verified: +1 (build failed) (build OK) C2 C2* refs/for/master clone push push local A1 C2 C2* master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 20. Gerrit: high level workflow CI Build: OK master A1 Verified: -1 Verified: +1 (build failed) (build OK) C2 C2* refs/for/master Reviewed: +2 clone push push local A1 C2 C2* master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 21. Gerrit: high level workflow CI Build: OK CI Build: OK master A1 C2* Verified: -1 Verified: +1 (build failed) (build OK) C2 C2* refs/for/master Reviewed: +2 clone push push local A1 C2 C2* master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 22. Cool, isn’t it ? • Gerrit allow “automatic” topic-branches • Triggers with Jenkins branch validation • Enforce collective code-ownership  People “interacts” with the code changes  Discussion on style and architecture  Democratic voting (+1 / -1) • Project history  Reason behind changes is recorded in code-review review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 23. See Gerrit “live” in action review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 24. 1. Set-up • Option-A: download and install 1. Download from http://code.google.com/p/gerrit/downloads/list 2. Gerrit install wizard: java –jar gerrit-2.2.2.1.war init -d ~/gerrit 3. Run Gerrit: ~/gerrit/bin/gerrit.sh start • Option-B: Gerrit as hosted service  Assembla.com (free for OpenSorce projects)  GitEnterprise.com (free up to 10 users) review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 25. 2. Create user and add SSH keys • Option-A: not easy   Gerrit doesn’t support a “local user registry”  Options: LDAP or OpenID • Option-B: use the provider user registration  Assembla: https://www.assembla.com/signup  GitEnterprise: https://gitent-scm.com/signup review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 26. 3. Talk to Gerrit via SSH • Gerrit SSH console  Listen at 29418 port  Not a real SSH server (just Gerrit listening) review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 27. 4. Create a Gerrit project • Gerrit Project is:  Git repository (use “path notation” to organise projects)  Access permissions  Code-review and change-sets • Option-A: use Gerrit SSH command $ ssh -p 29418 lmilanesio@localhost gerrit create-project lmit/33degree • Option-B: user the provider-specific page  Assembla: N/A (only 1 project associated to your “space”)  GitEnterprise: https://gitent-scm.com/newrepo review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 28. 5. Clone repo from Gerrit • Git SSH repository URL is: ssh://<user>@<host>:29418/<Gerrit project>.git • Gerrit supports HTTP or HTTP/S repository URL: http://<Gerrit URL>/p/<Gerrit project>.git NOTE: For HTTP authentication, put your credentials on ~/.netrc file machine <hostname> login <username> password <password> review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 29. 6. Gerrit Change-Id • SHA-1 GUID of a change-set under review • MUST be last line of commit msg Hint: install Gerrit post-commit hook for auto- generating Change-Id after each Git commit Now all Git commit will auto-generate a Change-Id ! review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 30. 7. Submit a change for review • Change for review committed locally • Push to refs/for/<branch> for submitting local Git changes for review on <branch> review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 31. 8. Verify change against CI review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 32. 9. Additional patch-set to Change-Id • Fix the problem locally • Amend the commit (same Change-Id) • Push again to refs/for/<branch> for adding one extra change-set review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 33. 10. Change-Id is validated against CI • Request code-review review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 34. 11. Review and comment changes review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 35. 12. Review merge and submit change • One or more reviewers can “vote” for the change • Authorised users can then “Submit” the change. • Change is automatically merged to master review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 36. 13. Master build is triggered … SUCCESS !! review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 37. … is just about code-review then ? GitHub BitBucket Gitorious Gerrit SSH / HTTPS Free public repo Free private repo Repo security Branch security Code review Hooks / API Replication CI Integration OpenSource / extensible Issue-tracker integration review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 38. Credits and resources • Many thanks to Shawn Pearce, father of Gerrit Its contributors and Google Inc. • Google Gerrit code-review http://code.google.com/p/gerrit/ • Assembla Gerrit http://review.assembla.com • GitEnterprise http://review.gitent-scm.com @gitenterprise Slides available at http://www.slideshare.net/lucamilanesio Follow me: @lucamilanesio review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 39. BACKUP review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 40. Gerrit: just code-review then ? • Git Security – Groups Define different “roles” in the project System groups • Anonymous users: use for public projects • Registered Users: all users • Administrators: to administer Gerrit • Project Owners: to administer projects • Non-interactive Users: for CI or batch operations Groups can be hierarchical (groups of groups) review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 41. Define groups and members Admin > Groups review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 42. Putting all together with projects • Git Security: rights to projects Define access rights to Git operations Control the Gerrit identity vs Git author / committer Delegate project administration Assign code-review voting range rights Define who can submit and merge changes Organise project rights hirarchically review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 43. Define project access rights per refspec Admin > Projects > 33degree > Access review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 44. Assign access rights to Groups review.GerritForge™.com Copyright © 2012 – LMIT Software
  • 45. … and Gerrit replication Remote gerrit or git Remote gerrit or git Master gerrit review.GerritForge™.com Copyright © 2012 – LMIT Software