SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Gerrit
                                        Daegeun Kim
                              (dani.kim@geekple.com)




                              1
Thursday,	 October	 20,
Gerrit



                       • A Code Review System based on JGit
                       • Open source (Apache 2 License)



                                          2
Thursday,	 October	 20,
Review
                                          개발            디버그




                  Pre-commit Review



                                      0        25        50   75   100



                                                    3
Thursday,	 October	 20,
Review
                                          개발            디버그




                  Pre-commit Review



                                      0        25        50   75   100



                                                    4
Thursday,	 October	 20,
Review
                                          개발            디버그




                  Pre-commit Review



                                      0        25        50   75   100



                                                    5
Thursday,	 October	 20,
Review
                                          개발            디버그




                  Pre-commit Review



                                      0        25        50   75   100



                                                    6
Thursday,	 October	 20,
Git standalone


                                                            pull/push
                            Working   commit
                             Tree


                                               Local Repo               Remote Repo




                                                  7
Thursday,	 October	 20,
Git and Gerrit
                                                                                      Remote Repo




                                                                           tch
                                                                p   ull/fe

                            Working    commit
                             Tree                                                             merge
                                                             pus
                                                                h fo
                                                Local Repo             r re
                                                                               view




                                                                                        Gerrit




                                                      8
Thursday,	 October	 20,
Git, Gerrit and CI
                                                                                     Remote Repo




                                                                          t  ch
                                                               p   ull/fe

                            Working   commit
                             Tree                                                            merge
                                                            pus
                                                               h fo
                                               Local Repo             r re
                                                                              view

                                                                         h
                                                                    fetc




                                                                         fy
                                                                    veri               Gerrit




                                                     9
Thursday,	 October	 20,
Request for Review
                                                                                     Remote Repo




                                                                               tch
                                                                    p   ull/fe


         •       Implementing a new feature                                                  merge
                                                               pus
                                                                  h fo
         •       Committing them to the repo
                                                    Local Repo         r re
                                                                            view


         •       Uploading changes to Gerrit



                                                                                       Gerrit




                                               10
Thursday,	 October	 20,
Uploading changes
                                 (Simple)

                    $ git init
                    $ git clone ssh://[user]@hostname:port/[project]
                    ...
                    $ git push origin HEAD:refs/for/master
                    ...




                                              11
Thursday,	 October	 20,
Uploading changes
                                  (Advanced)
                    $ git push [alias] HEAD:refs/for/[branch]
                    $ git push 
                            ssh://[user]@hostname:port/[project] 
                            HEAD:refs/for/[branch]
                    $ git push [alias] HEAD~1:refs/for/[branch]
                    $ git push [alias] [MD5]:refs/for/[branch]
                    or
                    $ git config remote.[alias].push refs/head/*:refs/for/*
                    $ git push [alias]


                                                12
Thursday,	 October	 20,
Adding Reviewers




                                               Add Reviewer




                                   13
Thursday,	 October	 20,
Uploading/Adding Reviewers
                                    (Advanced)

                    $ git push [alias] --receive-pack=‘git receive-pack 
                           --reviewer [email 1] --reviewer [email 2] 
                             --cc [email 3] --cc [email 4]‘ 
                             HEAD:refs/for/[branch]
                    or
                    $ git config remote.[alias].receivepack 
                             ‘git receive-pack --reviewer [email 1] 
                              --cc [email 2]’
                    $ git push [alias] HEAD:refs/for/[branch]


                                                 14
Thursday,	 October	 20,
Review and Verify
                                                                Remote Repo




                                              a. 1
                                                     fetc
                                                          h
                                                                        merge

                                              a.2
                                  Reviewers         revi
                                                           ew

                                                          h
                                                  .1 fetc
                                              b



                                                          fy
                                                     veri
                                              b   .2              Gerrit




                                        15
Thursday,	 October	 20,
Review
                                                                             Remote Repo




                                                           a. 1
                                                                  fetc
                                                                       h
                                                                                     merge

         •       Fetching the changes
                                                           a.2
                                                                 revi
                                               Reviewers                ew

         •       Code review!




                                                                               Gerrit




                                          16
Thursday,	 October	 20,
Fetching the changes

                                                   copy




                                     17
Thursday,	 October	 20,
Fetching the changes

                    $ git fetch http://hostname:port/p/[project] 
                         refs/changes/[last two numbers of change id]/
                         [change id]/[patch id]
                    $ git checkout FETCH_HEAD
                    $ git show HEAD


                  ex)
                   $ git fetch http://reviews.geekple.com/p/memcached 
                            refs/changes/40/40/2


                                                18
Thursday,	 October	 20,
Review
                                    (Advanced)


                    $ ssh -p [port] [user]@[hostname] gerrit review 
                           --code-review=+1 
                            --project=[project] 
                            [commit or change,patch]




                                              19
Thursday,	 October	 20,
Verify
                                                                      Remote Repo




                                                                              merge

         •       -1 when the build fails.


         •       +1 when it passes.
                                                            fetc
                                                                 h
                                                     b   .1




                                                                 fy
                                                            veri
                                                     b   .2             Gerrit




                                              20
Thursday,	 October	 20,
Verify
                                    (Advanced)


                    $ ssh -p [port] [user]@[hostname] gerrit review 
                           --verified=+1 
                            --project=[project] 
                            [commit or change,patch]




                                              21
Thursday,	 October	 20,
Q&A


                             22
Thursday,	 October	 20,

Weitere ähnliche Inhalte

Andere mochten auch

BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
Brendan Gregg
 

Andere mochten auch (7)

Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
 
Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
Kubernetes on GCP
Kubernetes on GCPKubernetes on GCP
Kubernetes on GCP
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
Gerrit Code Review
Gerrit Code ReviewGerrit Code Review
Gerrit Code Review
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Gerrit

  • 1. Gerrit Daegeun Kim (dani.kim@geekple.com) 1 Thursday, October 20,
  • 2. Gerrit • A Code Review System based on JGit • Open source (Apache 2 License) 2 Thursday, October 20,
  • 3. Review 개발 디버그 Pre-commit Review 0 25 50 75 100 3 Thursday, October 20,
  • 4. Review 개발 디버그 Pre-commit Review 0 25 50 75 100 4 Thursday, October 20,
  • 5. Review 개발 디버그 Pre-commit Review 0 25 50 75 100 5 Thursday, October 20,
  • 6. Review 개발 디버그 Pre-commit Review 0 25 50 75 100 6 Thursday, October 20,
  • 7. Git standalone pull/push Working commit Tree Local Repo Remote Repo 7 Thursday, October 20,
  • 8. Git and Gerrit Remote Repo tch p ull/fe Working commit Tree merge pus h fo Local Repo r re view Gerrit 8 Thursday, October 20,
  • 9. Git, Gerrit and CI Remote Repo t ch p ull/fe Working commit Tree merge pus h fo Local Repo r re view h fetc fy veri Gerrit 9 Thursday, October 20,
  • 10. Request for Review Remote Repo tch p ull/fe • Implementing a new feature merge pus h fo • Committing them to the repo Local Repo r re view • Uploading changes to Gerrit Gerrit 10 Thursday, October 20,
  • 11. Uploading changes (Simple) $ git init $ git clone ssh://[user]@hostname:port/[project] ... $ git push origin HEAD:refs/for/master ... 11 Thursday, October 20,
  • 12. Uploading changes (Advanced) $ git push [alias] HEAD:refs/for/[branch] $ git push ssh://[user]@hostname:port/[project] HEAD:refs/for/[branch] $ git push [alias] HEAD~1:refs/for/[branch] $ git push [alias] [MD5]:refs/for/[branch] or $ git config remote.[alias].push refs/head/*:refs/for/* $ git push [alias] 12 Thursday, October 20,
  • 13. Adding Reviewers Add Reviewer 13 Thursday, October 20,
  • 14. Uploading/Adding Reviewers (Advanced) $ git push [alias] --receive-pack=‘git receive-pack --reviewer [email 1] --reviewer [email 2] --cc [email 3] --cc [email 4]‘ HEAD:refs/for/[branch] or $ git config remote.[alias].receivepack ‘git receive-pack --reviewer [email 1] --cc [email 2]’ $ git push [alias] HEAD:refs/for/[branch] 14 Thursday, October 20,
  • 15. Review and Verify Remote Repo a. 1 fetc h merge a.2 Reviewers revi ew h .1 fetc b fy veri b .2 Gerrit 15 Thursday, October 20,
  • 16. Review Remote Repo a. 1 fetc h merge • Fetching the changes a.2 revi Reviewers ew • Code review! Gerrit 16 Thursday, October 20,
  • 17. Fetching the changes copy 17 Thursday, October 20,
  • 18. Fetching the changes $ git fetch http://hostname:port/p/[project] refs/changes/[last two numbers of change id]/ [change id]/[patch id] $ git checkout FETCH_HEAD $ git show HEAD ex) $ git fetch http://reviews.geekple.com/p/memcached refs/changes/40/40/2 18 Thursday, October 20,
  • 19. Review (Advanced) $ ssh -p [port] [user]@[hostname] gerrit review --code-review=+1 --project=[project] [commit or change,patch] 19 Thursday, October 20,
  • 20. Verify Remote Repo merge • -1 when the build fails. • +1 when it passes. fetc h b .1 fy veri b .2 Gerrit 20 Thursday, October 20,
  • 21. Verify (Advanced) $ ssh -p [port] [user]@[hostname] gerrit review --verified=+1 --project=[project] [commit or change,patch] 21 Thursday, October 20,
  • 22. Q&A 22 Thursday, October 20,