SlideShare a Scribd company logo
1 of 22
Download to read offline
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,

More Related Content

Viewers also liked

Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016Brendan Gregg
 
Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Brendan Gregg
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and moreBrendan Gregg
 
Kubernetes on GCP
Kubernetes on GCPKubernetes on GCP
Kubernetes on GCPDaegeun Kim
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf toolsBrendan Gregg
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 

Viewers also liked (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
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

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,