SlideShare a Scribd company logo
1 of 51
Download to read offline
1 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
CollabNet Git/Gerrit with TeamForge 
Secure, Scalable, Standards-Compliant for the Enterprise 
Johannes Nicolai 
Director of Engineering CollabNet
2 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Agenda 
•Introduction to Git, Gerrit and Jenkins 
•Git/Gerrit’s Place in the TeamForge Universe 
–Traceability 
–Searchability 
–Scalability 
–Security 
•Gerrit Signature Features 
–History Protection 
–Code Quality Gates 
•Q & A
3 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Introduction of Technologies 
•Git 
–Most popular emerging distributed SCM 
•Jenkins 
–Most popular open source Continuous Integration 
•Gerrit Code Review 
–Widely used code-review tool and Git server backend 
•CollabNet TeamForge® 
–Provides an unparalleled smooth integration of all these tools into your software development process
4 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
•Open source distributed SCM, used notably by: 
–Linux (it was originally developed for that very purpose) 
–Eclipse foundation 
–Android (based on Gerrit Code Review) 
• Why Git? 
–All operations are local 
•Search, log, history, branching and merging 
•Offline development is possible 
–Powerful merging strategies (merge, rebase, cherry-pick) 
Git = Leading DVCS (Distributed Version Control System)
5 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git Popularity Continues to Grow, But…. 
“ 
The adoption of DVCS has accelerated in small teams, but is moving more slowly in enterprise settings. 
Source: Gartner, 27 July 2011 ID Number: G00214153; Hype Cycle for Application Development, 2011; Ian Finley, Mike Blechar
6 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
•100% pure Java SSH and HTTP Git backend 
–Scalable and suitable for large Enterprises 
•Web-based and Command Line administration 
–Users and Groups 
–Project and branch security (read and write) 
•Collaboration and Code-review 
–B2B integration at code-level 
–Communicate and share code knowledge in the Team 
–Enforce workflow and code quality 
•The most successful open source code review 
–Android OS 
–Eclipse, OpenStack, Qt, CouchDB and many others 
Gerrit = (Widely Used) Git Server + Code Review Tool
7 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Who’s Using Gerrit in Production Today? 
source: Wikipedia
8 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Jenkins = Most popular Open Source CI 
•Has hundreds of plugins to 
–Interact with various SCMs (Git, SVN, CVS, …) 
–Build software (ant, maven, gradle, make) 
–Run unit/integration tests (JUnit, Selenium, …) 
–Perform static code analysis (findbugs, checkstyle, PMS, Sonar, …) 
•Works brilliantly together with Gerrit over Gerrit Trigger Plugin 
–Keeps ssh connection open to learn about new review requests immediatly 
–Builds and verifies all configures quality gates (tests, coding conventions, code KPIs, you name it) 
–Sets ‘verified’ flag in review request according to result of verification build (either +1 or -1) 
–If Jenkins sets -1, then further code review isn’t possible, developer has to either re-work or abandon change
9 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Tackling half baked review requests: Marrying Gerrit and Jenkins 
master 
CI Build: OK 
CI Build: OK 
A1 
local master 
Verified: -1 (build failed) 
Verified: +1 (build OK) 
refs/for/master 
C2 
push 
C2 
C2* 
C2* 
push 
Reviewed: +2 
C2* 
A1
10 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
24/7 Support 
Git/Gerrit Training 
Standards-Compliance 
Scalability 
ALM Integration 
History Protection 
Code Quality 
Advanced Git security 
Git Projects organization 
Code-review 
Replication 
TeamForge = Enterprise-Grade Git Mgmt. + ALM 
Basic SCM features 
jGit engine 
Native engine 
GitWeb 
Gerrit 
With TeamForge and Gerrit, Git is now ready for the enterprise. Realize all the benefits of Git, without compromising governance, security and compliance.
11 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Integration of existing tools 
Security, standards and audit compliance 
Scalability (and manageability at scale) 
TeamForge = Enterprise-Grade Git Mgmt. + ALM
12 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Searchability – across TF artifacts, including Code Search across multiple repositories, gerrit instances and other SCM tools (svn, cvs, perforce...) 
Traceability – associating the source code with requirements, issues, documents, tasks and other artifacts. 
RBAC – Role Based Access Control - for each application's concepts, documents, file releases, trackers, and discussion forums, you can assign permissions globally based on user roles 
TeamForge = Enterprise-Grade Git Mgmt. + ALM
13 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Simple RBAC - TeamForge
14 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Gerrit Acces Rights- Not simple at all
15 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Implementation: 
Map TeamForge SCM permissions to Gerrit Access Rights. 
Provide pre-defined code review policies so anyone can start to work with Gerrit within a few steps. 
Code review policies are applied per repository. 
Motivation: 
Shield most users from Gerrit’s complexities by using pre-defined repo categories and generic TeamForge RBAC model with its SCM permissions. 
without hiding advanced features for power users 
RepoCategories: Bridging the RBAC gap
16 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
RepoCategories: Bridging the RBAC gap
17 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
24/7 Support 
Git/Gerrit Training 
Standards-Compliance 
Scalability 
ALM Integration 
History Protection 
Code Quality 
Advanced Git security 
Git Projects organization 
Code-review 
Replication 
TeamForge = Enterprise-Grade Git Mgmt. + ALM 
Basic SCM features 
jGit engine 
Native engine 
GitWeb 
Gerrit 
With TeamForge and Gerrit, Git is now ready for the enterprise. Realize all the benefits of Git, without compromising governance, security and compliance.
18 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Rewrite – Defined 
“We define History Rewrite as non-fast forward updates of remote refs and its associated objects. This happens whenever a branch in the remote repository gets deleted, previously pushed commits get amended/tree filtered and forcefully re-pushed, or a remote branch/tag is pointed to an entire different commit history.”
19 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Rewrite – Functionality in Detail 
Commit #1 
Initially files added 
File A added 
Commit #2 
More files added 
File B Added 
Commit #3 
Files modified 
File A modified 
Commit #4 
Files Deleted 
File A Delete 
Change log 
Change log after History Re-Write 
Commit #1 
Initially files added 
File A added 
Commit #5 
More files added 
File X added 
Commit #1 
Initially files added 
File A added 
Commit #2 
More files added 
File B Added 
Commit #3 
Files modified 
File A modified 
Commit #4 
Files Deleted 
File A Delete 
Local git commit(s) 
•No traces about deleted changes (commits & metadata associated, files, directories) 
•Periodic garbage collection will remove unreferenced commits soon and afterwards they can no longer be recovered 
Local Git Repo 
git clone 
Developer 
Commit #1 
Initially files added 
File A added 
Commit #2 
More files added 
Commit #3 
Files modified 
Commit #4 
Files Deleted 
Developer 
Removes some files either 
by purpose or accidentally 
Blessed Git Repo 
git push –f origin master 
Commit #1 
Initially files added 
File A added 
Commit #5 
More files added 
File X added
20 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Rewrite – No Traces Left Behind! 
Code Change History 
Removing top 6 commits locally 
Creating new commit locally 
Pushing all changes to remote 
No traces about deleted 6 commits in Web UI
21 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Single ‘space’ wipes entire history: 
–git push origin production-quick-fix:stable 
instead of 
–git push origin production-quick-fix :stable 
No traces left behind: 
–No alerts 
–No recovery (unless noticed quickly, via administrators) 
Happens even to the experts: 
–https://bugs.eclipse.org/bugs/show_bug.cgi?id=361707 
–Eclipse Foundation lost almost all their branches and tags accidentally, garbage collection pruned unreferenced commits, administrators had to ask developers for a recent local backup 
–http://jenkins-ci.org/content/summary-report-git-repository- disruption-incident-nov-10th 
–186 repositories from Jenkins Open Source Project got reset on GitHub 
Git History Rewrite – This Can Happen to You, Too!
22 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Introducing Git History Protection 
Commit #1 
Initially files added 
File A added 
Commit #2 
More files added 
File B Added 
Commit #3 
Files modified 
File A modified 
Commit #4 
Files Deleted 
File A Delete 
Change log 
Change log after History Re-Write 
Commit #1 
Initially files added 
File A added 
Commit #5 
More files added 
File X added 
Commit #1 
Initially files added 
File A added 
Commit #2 
More files added 
File B Added 
Commit #3 
Files modified 
File A modified 
Commit #4 
Files Deleted 
File A Delete 
Local git commit(s) 
Local Git Repo 
git clone 
Developer 
Commit #1 
Initially files added 
File A added 
Commit #2 
More files added 
Commit #3 
Files modified 
Commit #4 
Files Deleted 
Developer 
Removes some files either 
by purpose or accidentally 
Blessed Git Repo 
git push –f origin master 
Commit #1 
Initially files added 
File A added 
Commit #5 
More files added 
File X added 
TeamForge 
History Protect 
Detects 
Rewrite Event 
1.Notification: Automatic e-mail to administrators 
2.Reporting: Temper-proof audit- trail (who, what, when) 
3.Recovery: Self-service resurrection of history rewrite 
TeamForge automatically secures history snapshots on ‘blessed’ master repository (under “refs/rewrite” or “refs/deleted”), for auditing & recovery.
23 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
24/7 Support 
Git/Gerrit Training 
Standards-Compliance 
Scalability 
ALM Integration 
History Protection 
Code Quality 
Advanced Git security 
Git Projects organization 
Code-review 
Replication 
TeamForge = Enterprise-Grade Git Mgmt. + ALM 
Basic SCM features 
jGit engine 
Native engine 
GitWeb 
Gerrit 
With TeamForge and Gerrit, Git is now ready for the enterprise. Realize all the benefits of Git, without compromising governance, security and compliance.
24 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Tackling half baked review requests: Marrying Gerrit and Jenkins 
master 
CI Build: OK 
CI Build: OK 
A1 
local master 
Verified: -1 (build failed) 
Verified: +1 (build OK) 
refs/for/master 
C2 
push 
C2 
C2* 
C2* 
push 
Reviewed: +2 
C2* 
A1
25 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Gerrit – Code Quality Gate Wizard – General Concept
26 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Code Quality Gate Wizard 
Code Quality Gate Wizard for Gerrit (Gerrit 2.8+) 
–comes with a bunch of predefined policies and lets you graphically design your own quality gates as easy as defining email filter rules. 
–Examples: 
•Four-eye peer review 
•Legal has to approve copyright file changes 
•Senior staff has to approve the work of juniors 
•Democratic feature voting 
–More details under http://blogs.collab.net/git
27 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Gerrit – Code Quality Gate Wizard – How to launch
28 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Gerrit – Code Quality Gate Wizard – Predefined templates
29 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Gerrit – Code Quality Gate Wizard – Built In Test Mode
30 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Gerrit – Code Quality Gate Wizard – Based on existing changes
31 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Gerrit – Code Quality Gate Wizard – Great Flexibility
32 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
24/7 Support 
Security 
Standards-Compliance 
Scalability 
ALM Integration 
History Protection 
Code Quality 
Advanced Git security 
Git Projects organization 
Code-review 
Replication 
TeamForge = Enterprise-Grade Git Mgmt. + ALM 
Basic SCM features 
jGit engine 
Native engine 
GitWeb 
Gerrit 
With TeamForge and Gerrit, Git is now ready for the enterprise. Realize all the benefits of Git, without compromising governance, security and compliance.
33 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
3-Minute Video on History Protection http://www.collab.net/products/teamforge/git-for-the-enterprise 
Software Downloads (TeamForge, Git + clients) http://www.collab.net/git 
Git Blogs 
http://blogs.collab.net/git 
Learn More
34 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Q&A
35 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Default: All Gerrit review features are turned off 
Mandatory Review: All code changes have to be reviewed 
Optional Review: Review feature is turned on but can be bypassed if necessary 
Custom: Access rights have to be set manually in Gerrit Web UI and will not be overridden by TeamForge 
User-defined: Possibility to define your own access rights controlled by TeamForge 
Pre defined & user-defined categories 
Feature deep dive: Simple RBAC
36 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Rewrite – Example: Accidental Branch Deletion 
Prepare a fix in local branch which is to be pushed to stable branch on remote. 
Use this syntax for PUSH to remote 
Typo in push command...(accidentially added a space) 
Results in branch deletion. No trace on Web UI on Git server side (stable branch got deleted)
37 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Protection – Alerting 
1.Notification: Automatic e-mail to administrators 
2.Reporting: Temper-proof audit-trail (who, what, when) 
3.Recovery: Self-service resurrection of history rewrite 
Whenever history gets ‘re-written’, an email gets sent out to ‘Gerrit Administrators’ containing details about old HEAD of branch and new HEAD after ‘re-write’.
38 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Protection – Reporting (Audit Log) 
Audit Log containing all History Rewrite Events is accessible through TeamForge Web UI 
1.Notification: Automatic e-mail to administrators 
2.Reporting: Temper-proof audit-trail (who, what, when) 
3.Recovery: Self-service resurrection of history rewrite
39 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Protection – Reporting (Web UI) 
1.Notification: Automatic e-mail to administrators 
2.Reporting: Temper-proof audit-trail (who, what, when) 
3.Recovery: Self-service resurrection of history rewrite
40 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Protection – Reporting (Command Line) 
1.Notification: Automatic e-mail to administrators 
2.Reporting: Temper-proof audit-trail (who, what, when) 
3.Recovery: Self-service resurrection of history rewrite
41 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Protection – Reporting (Eclipse) 
1.Notification: Automatic e-mail to administrators 
2.Reporting: Temper-proof audit-trail (who, what, when) 
3.Recovery: Self-service resurrection of history rewrite
42 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Protection – Recovery (Web UI) 
1.Notification: Automatic e-mail to administrators 
2.Reporting: Temper-proof audit-trail (who, what, when) 
3.Recovery: Self-service resurrection of history rewrite
43 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Protection – Recovery (Command Line) 
1 
Run this command on git command line 
2 
Copy HEAD SHA1 of branch created after history ’re-write’ 
3 
Use copied SHA1 to create new local branch in Git 
Push this local branch to remote ‘blessed reposiotry’ 
Resurrected branch via command line is now available for all user having atleast read access(view only) for this Git repository 
Fetch SHA1 of rewritten history from server 
4 
5 
Alternatively users having permissions to create a new branch can restore history by using their git client 
1.Notification: Automatic e-mail to administrators 
2.Reporting: Temper-proof audit-trail (who, what, when) 
3.Recovery: Self-service resurrection of history rewrite
44 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Protection – Administration 
Gerrit Config-Option allows you to protect all Git repositories hosted by TeamForge: Not even TeamForge Site Admins can override
45 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Rewrite – Why Blocking is NOT the Answer 
Legitimate use cases 
–Developers 
•Deleting accidently committed file(s)/change(s) 
•Change appearance of commits 
–squashing multiple commits into unified single commit 
–change order of commits 
–Build / Release managers / Developers 
•Removing Copyrights/ Intellectual Property(IP) related resources from code base 
•Removing large file(s) 
•Removing feature branch(es) created temporarily and already merged 
Not (so) Legitimate use cases 
–Developers / Build / Release Managers 
•Remove somebody else’s changes without leaving any trace 
•Pretending someone else’s change as own (forgery) 
•Accidentally removing branches
46 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Rewrite – Why Blocking is NOT the Answer 
Legitimate use cases 
–Developers 
•Deleting accidently committed file(s)/change(s) 
•Change appearance of commits 
–squashing multiple commits into unified single commit 
–change order of commits 
–Build / Release managers / Developers 
•Removing Copyrights/ Intellectual Property(IP) related resources from code base 
•Removing large file(s) 
•Removing feature branch(es) created temporarily and already merged 
Not (so) Legitimate use cases 
–Developers / Build / Release Managers 
•Remove somebody else’s changes without leaving any trace 
•Pretending someone else’s change as own (forgery) 
•Accidentally removing branches
47 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Git History Rewrite – Why Blocking is NOT the Answer 
Legitimate use cases 
–Developers 
•Deleting accidently committed file(s)/change(s) 
•Change appearance of commits 
–squashing multiple commits into unified single commit 
–change order of commits 
–Build / Release managers / Developers 
•Removing Copyrights/ Intellectual Property(IP) related resources from code base 
•Removing large file(s) 
•Removing feature branch(es) created temporarily and already merged 
Not (so) Legitimate use cases 
–Developers / Build / Release Managers 
•Remove somebody else’s changes without leaving any trace 
•Pretending someone else’s change as own (forgery) 
•Accidentally removing branches
48 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
•TeamForge + Gerrit is a powerful foundation for Enterprise Git 
•Git History Rewrite covers branch deletions and forced pushes, two very powerful, often needed but quite dangerous operations which might lead to data loss and tampering 
•TeamForge 6.2 with Gerrit introduced History Protection 
•History protection ensures that potentially unnoticed events, such as remote branch deletions and forced pushes, are now detected and fully recoverable, any modifications to Git code and repositories are securely recorded with tamper-proof audit logs 
•Recovery is possible from a Web interface at the push of a button, and using an ordinary Git client, IT operations teams don’t have to be involved 
Git History Protection - Summary
49 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Motivation: 
Bring the git push notifications mechanism from the gitmultimail script to TeamForge 
Feature deep dive: Notifications
50 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Feature deep dive: Notifications
51 
Copyright ©2012 CollabNet, Inc. All Rights Reserved. 
Appendix – History Rewrite, versus Git Reflog 
Git reflog 
TeamForge 
Git Integration with ‘History Protect’ 
Accessibility 
Requires direct access to file system on server where ‘blessed Git repository’ is hosted which is very unlikely in huge organizations and will keep the server administrators busy 
‘Self –Service’ approach. Users with appropriate permissions in TeamForge can find out/resurrect deleted/rewritten branches by themselves, decreasing work load of server administrators. 
Gerrit Administrators can also permanently delete selected branches/tags. 
Signal-to- Noise Ratio 
reflog records <all> changes in the repository 
•Any push (also ordinary fast forward) 
•Any merge 
•Any Branch creation/deletion 
•Any Tag creation / deletion 
Finding out about history rewrites/deleted branches is like searching for a needle in a haystack 
History Protect only reports 
•Deleted branches/tags 
•History rewrites (non fast forward pushes) 
Notification 
No notification 
•Email to Gerrit Administrators 
•Audit log entry whenever branch/tags gets 
•Deleted 
•Re-written (non fast forward) 
•Resurrected 
•Permanently deleted 
Ease of use 
•Only manually configurable by administrator having file system access 
•To be configured for each and every repository 
•Restoring requires running git commands on server 
•Pre-configured in TeamForge/Gerrit 
•Configurable for all repositories by setting site-wide config option or on a per repository basis 
•User with appropriate permission can restore history using Gerrit WebUI / Git client 
Protection against object pruning/reflog expiration 
RefLog expiration and gc pruning settings have to be manually configured by server administrator. Only possibility to not lose commits no longer referenced in a branch is to set both values to <unlimited> which will consume huge amounts of disk space, slows down garbage collection and does not allow to permanently delete specific commits (all or nothing). 
Preserved commits will never pruned by garbage collection unless permanently removed using Gerrit Web UI. 
No need to keep a large ref log. Garbage collection will run faster since all commits are still referenced in the repo.

More Related Content

What's hot

GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
Weaveworks
 

What's hot (20)

Formation autour de git et git lab
Formation autour de git et git labFormation autour de git et git lab
Formation autour de git et git lab
 
GitOps - Modern best practices for high velocity app dev using cloud native t...
GitOps - Modern best practices for high velocity app dev using cloud native t...GitOps - Modern best practices for high velocity app dev using cloud native t...
GitOps - Modern best practices for high velocity app dev using cloud native t...
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git slides
Git slidesGit slides
Git slides
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Meetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOpsMeetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOps
 
Kubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & OperatorsKubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & Operators
 
Gitlab, GitOps & ArgoCD
Gitlab, GitOps & ArgoCDGitlab, GitOps & ArgoCD
Gitlab, GitOps & ArgoCD
 
Migrating To GitHub
Migrating To GitHub  Migrating To GitHub
Migrating To GitHub
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Git training v10
Git training v10Git training v10
Git training v10
 
Learning git
Learning gitLearning git
Learning git
 
Git
GitGit
Git
 
git and github
git and githubgit and github
git and github
 
GitOps and ArgoCD
GitOps and ArgoCDGitOps and ArgoCD
GitOps and ArgoCD
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 

Viewers also liked

Git Gerrit Mit Teamforge
Git Gerrit Mit TeamforgeGit Gerrit Mit Teamforge
Git Gerrit Mit Teamforge
CollabNet
 
Enterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - GermanEnterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - German
CollabNet
 
ASiT Poster v0.81
ASiT Poster v0.81ASiT Poster v0.81
ASiT Poster v0.81
Guy Stanley
 

Viewers also liked (20)

Gerrit Code Review
Gerrit Code ReviewGerrit Code Review
Gerrit Code Review
 
Open Container Initiative Update
Open Container Initiative UpdateOpen Container Initiative Update
Open Container Initiative Update
 
Understanding and Using Git at Eclipse
Understanding and Using Git at EclipseUnderstanding and Using Git at Eclipse
Understanding and Using Git at Eclipse
 
Introducing CollabNet TeamForge® 8.0
Introducing CollabNet TeamForge® 8.0Introducing CollabNet TeamForge® 8.0
Introducing CollabNet TeamForge® 8.0
 
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!
 
Gerrit Code Review - The Introduction
Gerrit Code Review - The IntroductionGerrit Code Review - The Introduction
Gerrit Code Review - The Introduction
 
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
 
The R.O.A.D to DevOps
The R.O.A.D to DevOpsThe R.O.A.D to DevOps
The R.O.A.D to DevOps
 
Git Gerrit Mit Teamforge
Git Gerrit Mit TeamforgeGit Gerrit Mit Teamforge
Git Gerrit Mit Teamforge
 
Hero's Tookit: Start Your Rugged DevOps Journey with Nexus, Jenkins and Docker
Hero's Tookit: Start Your Rugged DevOps Journey with Nexus, Jenkins and DockerHero's Tookit: Start Your Rugged DevOps Journey with Nexus, Jenkins and Docker
Hero's Tookit: Start Your Rugged DevOps Journey with Nexus, Jenkins and Docker
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
Culture Hacker: How to Herd CATTs and Inspire Rebels to Change the World! - S...
Culture Hacker: How to Herd CATTs and Inspire Rebels to Change the World! - S...Culture Hacker: How to Herd CATTs and Inspire Rebels to Change the World! - S...
Culture Hacker: How to Herd CATTs and Inspire Rebels to Change the World! - S...
 
Enterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - GermanEnterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - German
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review Upgrade
 
Scaling Rugged DevOps to Thousands of Applications - Panel Discussion
Scaling Rugged DevOps to Thousands of Applications - Panel DiscussionScaling Rugged DevOps to Thousands of Applications - Panel Discussion
Scaling Rugged DevOps to Thousands of Applications - Panel Discussion
 
Requirements Gathering for a Successful Rugged DevOps Implementation - Hasan ...
Requirements Gathering for a Successful Rugged DevOps Implementation - Hasan ...Requirements Gathering for a Successful Rugged DevOps Implementation - Hasan ...
Requirements Gathering for a Successful Rugged DevOps Implementation - Hasan ...
 
Implementing DevOps in a Regulated Environment - DJ Schleen
Implementing DevOps in a Regulated Environment - DJ SchleenImplementing DevOps in a Regulated Environment - DJ Schleen
Implementing DevOps in a Regulated Environment - DJ Schleen
 
Gerrit Code Review Analytics
Gerrit Code Review AnalyticsGerrit Code Review Analytics
Gerrit Code Review Analytics
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
 
ASiT Poster v0.81
ASiT Poster v0.81ASiT Poster v0.81
ASiT Poster v0.81
 

Similar to Git/Gerrit with TeamForge

2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
Mythri P K
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
uzair
 

Similar to Git/Gerrit with TeamForge (20)

Enterprise Git Adoption Webinar - Chinese
Enterprise Git Adoption Webinar - ChineseEnterprise Git Adoption Webinar - Chinese
Enterprise Git Adoption Webinar - Chinese
 
Git for Windows
Git for WindowsGit for Windows
Git for Windows
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Git workshop
Git workshopGit workshop
Git workshop
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
 
git presentation
git presentation git presentation
git presentation
 
[Perforce] Git Fusion
[Perforce] Git Fusion[Perforce] Git Fusion
[Perforce] Git Fusion
 
Data science Git management
Data science Git managementData science Git management
Data science Git management
 
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the EnterpriseBetter, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Manage Org Changes Using the Force.com Migration Tool and Git
Manage Org Changes Using the Force.com Migration Tool and GitManage Org Changes Using the Force.com Migration Tool and Git
Manage Org Changes Using the Force.com Migration Tool and Git
 
GDSC23 - Github Workshop Presentation.pptx
GDSC23 - Github Workshop Presentation.pptxGDSC23 - Github Workshop Presentation.pptx
GDSC23 - Github Workshop Presentation.pptx
 
Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levels
 
Git session 1
Git session 1Git session 1
Git session 1
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Optimize Your Enterprise Git Webinar
Optimize Your Enterprise Git WebinarOptimize Your Enterprise Git Webinar
Optimize Your Enterprise Git Webinar
 
Git Series - Part 1
Git Series - Part 1 Git Series - Part 1
Git Series - Part 1
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network Engineers
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 

More from CollabNet

Hybrid Development Webinar - English
Hybrid Development Webinar - EnglishHybrid Development Webinar - English
Hybrid Development Webinar - English
CollabNet
 

More from CollabNet (20)

TeamForge Overview Webinar (10/5/16)
TeamForge Overview Webinar (10/5/16)TeamForge Overview Webinar (10/5/16)
TeamForge Overview Webinar (10/5/16)
 
TeamForge Overview Webinar (9/21)
TeamForge Overview Webinar (9/21)TeamForge Overview Webinar (9/21)
TeamForge Overview Webinar (9/21)
 
Modernize Development with Agile Engineering Practices
Modernize Development with Agile Engineering PracticesModernize Development with Agile Engineering Practices
Modernize Development with Agile Engineering Practices
 
Migrating from ClearCase
Migrating from ClearCaseMigrating from ClearCase
Migrating from ClearCase
 
TeamForge Overview Webinar (8/24)
TeamForge Overview Webinar (8/24)TeamForge Overview Webinar (8/24)
TeamForge Overview Webinar (8/24)
 
2016 Federal User Group Conference - What's New in TeamForge
2016 Federal User Group Conference - What's New in TeamForge2016 Federal User Group Conference - What's New in TeamForge
2016 Federal User Group Conference - What's New in TeamForge
 
2016 Federal User Group Conference - TeamForge Capabilities and Directions
2016 Federal User Group Conference - TeamForge Capabilities and Directions2016 Federal User Group Conference - TeamForge Capabilities and Directions
2016 Federal User Group Conference - TeamForge Capabilities and Directions
 
2016 Federal User Group Conference - DevOps Product Strategy
2016 Federal User Group Conference - DevOps Product Strategy2016 Federal User Group Conference - DevOps Product Strategy
2016 Federal User Group Conference - DevOps Product Strategy
 
Expedite Enterprise Software Development with JIRA®, TeamForge® SCM, and Jenkins
Expedite Enterprise Software Development with JIRA®, TeamForge® SCM, and JenkinsExpedite Enterprise Software Development with JIRA®, TeamForge® SCM, and Jenkins
Expedite Enterprise Software Development with JIRA®, TeamForge® SCM, and Jenkins
 
CollabNet TeamForge 8.1 Webinar
CollabNet TeamForge 8.1 WebinarCollabNet TeamForge 8.1 Webinar
CollabNet TeamForge 8.1 Webinar
 
Compliance and Governance Webinar
Compliance and Governance WebinarCompliance and Governance Webinar
Compliance and Governance Webinar
 
Hybrid Development Webinar - English
Hybrid Development Webinar - EnglishHybrid Development Webinar - English
Hybrid Development Webinar - English
 
Agile Upstream and Downstream Webinar - English
Agile Upstream and Downstream Webinar - EnglishAgile Upstream and Downstream Webinar - English
Agile Upstream and Downstream Webinar - English
 
SCM Migration Webinar - English
SCM Migration Webinar - EnglishSCM Migration Webinar - English
SCM Migration Webinar - English
 
Vorstellung von CollabNet TeamForge 8.0 (German)
Vorstellung von CollabNet TeamForge 8.0 (German)Vorstellung von CollabNet TeamForge 8.0 (German)
Vorstellung von CollabNet TeamForge 8.0 (German)
 
CollabNet TeamForge 8.0 简介 (Chinese)
CollabNet TeamForge 8.0 简介 (Chinese)CollabNet TeamForge 8.0 简介 (Chinese)
CollabNet TeamForge 8.0 简介 (Chinese)
 
Metrics to Power DevOps
Metrics to Power DevOpsMetrics to Power DevOps
Metrics to Power DevOps
 
Enterprise CI as-a-Service using Jenkins
Enterprise CI as-a-Service using JenkinsEnterprise CI as-a-Service using Jenkins
Enterprise CI as-a-Service using Jenkins
 
Testlink Test Management with Teamforge
Testlink Test Management with TeamforgeTestlink Test Management with Teamforge
Testlink Test Management with Teamforge
 
Linking Upstream and Downstream Agile
Linking Upstream and Downstream AgileLinking Upstream and Downstream Agile
Linking Upstream and Downstream Agile
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
 
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
 
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
 

Recently uploaded (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
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
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
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...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Git/Gerrit with TeamForge

  • 1. 1 Copyright ©2012 CollabNet, Inc. All Rights Reserved. CollabNet Git/Gerrit with TeamForge Secure, Scalable, Standards-Compliant for the Enterprise Johannes Nicolai Director of Engineering CollabNet
  • 2. 2 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Agenda •Introduction to Git, Gerrit and Jenkins •Git/Gerrit’s Place in the TeamForge Universe –Traceability –Searchability –Scalability –Security •Gerrit Signature Features –History Protection –Code Quality Gates •Q & A
  • 3. 3 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Introduction of Technologies •Git –Most popular emerging distributed SCM •Jenkins –Most popular open source Continuous Integration •Gerrit Code Review –Widely used code-review tool and Git server backend •CollabNet TeamForge® –Provides an unparalleled smooth integration of all these tools into your software development process
  • 4. 4 Copyright ©2012 CollabNet, Inc. All Rights Reserved. •Open source distributed SCM, used notably by: –Linux (it was originally developed for that very purpose) –Eclipse foundation –Android (based on Gerrit Code Review) • Why Git? –All operations are local •Search, log, history, branching and merging •Offline development is possible –Powerful merging strategies (merge, rebase, cherry-pick) Git = Leading DVCS (Distributed Version Control System)
  • 5. 5 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git Popularity Continues to Grow, But…. “ The adoption of DVCS has accelerated in small teams, but is moving more slowly in enterprise settings. Source: Gartner, 27 July 2011 ID Number: G00214153; Hype Cycle for Application Development, 2011; Ian Finley, Mike Blechar
  • 6. 6 Copyright ©2012 CollabNet, Inc. All Rights Reserved. •100% pure Java SSH and HTTP Git backend –Scalable and suitable for large Enterprises •Web-based and Command Line administration –Users and Groups –Project and branch security (read and write) •Collaboration and Code-review –B2B integration at code-level –Communicate and share code knowledge in the Team –Enforce workflow and code quality •The most successful open source code review –Android OS –Eclipse, OpenStack, Qt, CouchDB and many others Gerrit = (Widely Used) Git Server + Code Review Tool
  • 7. 7 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Who’s Using Gerrit in Production Today? source: Wikipedia
  • 8. 8 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Jenkins = Most popular Open Source CI •Has hundreds of plugins to –Interact with various SCMs (Git, SVN, CVS, …) –Build software (ant, maven, gradle, make) –Run unit/integration tests (JUnit, Selenium, …) –Perform static code analysis (findbugs, checkstyle, PMS, Sonar, …) •Works brilliantly together with Gerrit over Gerrit Trigger Plugin –Keeps ssh connection open to learn about new review requests immediatly –Builds and verifies all configures quality gates (tests, coding conventions, code KPIs, you name it) –Sets ‘verified’ flag in review request according to result of verification build (either +1 or -1) –If Jenkins sets -1, then further code review isn’t possible, developer has to either re-work or abandon change
  • 9. 9 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Tackling half baked review requests: Marrying Gerrit and Jenkins master CI Build: OK CI Build: OK A1 local master Verified: -1 (build failed) Verified: +1 (build OK) refs/for/master C2 push C2 C2* C2* push Reviewed: +2 C2* A1
  • 10. 10 Copyright ©2012 CollabNet, Inc. All Rights Reserved. 24/7 Support Git/Gerrit Training Standards-Compliance Scalability ALM Integration History Protection Code Quality Advanced Git security Git Projects organization Code-review Replication TeamForge = Enterprise-Grade Git Mgmt. + ALM Basic SCM features jGit engine Native engine GitWeb Gerrit With TeamForge and Gerrit, Git is now ready for the enterprise. Realize all the benefits of Git, without compromising governance, security and compliance.
  • 11. 11 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Integration of existing tools Security, standards and audit compliance Scalability (and manageability at scale) TeamForge = Enterprise-Grade Git Mgmt. + ALM
  • 12. 12 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Searchability – across TF artifacts, including Code Search across multiple repositories, gerrit instances and other SCM tools (svn, cvs, perforce...) Traceability – associating the source code with requirements, issues, documents, tasks and other artifacts. RBAC – Role Based Access Control - for each application's concepts, documents, file releases, trackers, and discussion forums, you can assign permissions globally based on user roles TeamForge = Enterprise-Grade Git Mgmt. + ALM
  • 13. 13 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Simple RBAC - TeamForge
  • 14. 14 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Gerrit Acces Rights- Not simple at all
  • 15. 15 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Implementation: Map TeamForge SCM permissions to Gerrit Access Rights. Provide pre-defined code review policies so anyone can start to work with Gerrit within a few steps. Code review policies are applied per repository. Motivation: Shield most users from Gerrit’s complexities by using pre-defined repo categories and generic TeamForge RBAC model with its SCM permissions. without hiding advanced features for power users RepoCategories: Bridging the RBAC gap
  • 16. 16 Copyright ©2012 CollabNet, Inc. All Rights Reserved. RepoCategories: Bridging the RBAC gap
  • 17. 17 Copyright ©2012 CollabNet, Inc. All Rights Reserved. 24/7 Support Git/Gerrit Training Standards-Compliance Scalability ALM Integration History Protection Code Quality Advanced Git security Git Projects organization Code-review Replication TeamForge = Enterprise-Grade Git Mgmt. + ALM Basic SCM features jGit engine Native engine GitWeb Gerrit With TeamForge and Gerrit, Git is now ready for the enterprise. Realize all the benefits of Git, without compromising governance, security and compliance.
  • 18. 18 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Rewrite – Defined “We define History Rewrite as non-fast forward updates of remote refs and its associated objects. This happens whenever a branch in the remote repository gets deleted, previously pushed commits get amended/tree filtered and forcefully re-pushed, or a remote branch/tag is pointed to an entire different commit history.”
  • 19. 19 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Rewrite – Functionality in Detail Commit #1 Initially files added File A added Commit #2 More files added File B Added Commit #3 Files modified File A modified Commit #4 Files Deleted File A Delete Change log Change log after History Re-Write Commit #1 Initially files added File A added Commit #5 More files added File X added Commit #1 Initially files added File A added Commit #2 More files added File B Added Commit #3 Files modified File A modified Commit #4 Files Deleted File A Delete Local git commit(s) •No traces about deleted changes (commits & metadata associated, files, directories) •Periodic garbage collection will remove unreferenced commits soon and afterwards they can no longer be recovered Local Git Repo git clone Developer Commit #1 Initially files added File A added Commit #2 More files added Commit #3 Files modified Commit #4 Files Deleted Developer Removes some files either by purpose or accidentally Blessed Git Repo git push –f origin master Commit #1 Initially files added File A added Commit #5 More files added File X added
  • 20. 20 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Rewrite – No Traces Left Behind! Code Change History Removing top 6 commits locally Creating new commit locally Pushing all changes to remote No traces about deleted 6 commits in Web UI
  • 21. 21 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Single ‘space’ wipes entire history: –git push origin production-quick-fix:stable instead of –git push origin production-quick-fix :stable No traces left behind: –No alerts –No recovery (unless noticed quickly, via administrators) Happens even to the experts: –https://bugs.eclipse.org/bugs/show_bug.cgi?id=361707 –Eclipse Foundation lost almost all their branches and tags accidentally, garbage collection pruned unreferenced commits, administrators had to ask developers for a recent local backup –http://jenkins-ci.org/content/summary-report-git-repository- disruption-incident-nov-10th –186 repositories from Jenkins Open Source Project got reset on GitHub Git History Rewrite – This Can Happen to You, Too!
  • 22. 22 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Introducing Git History Protection Commit #1 Initially files added File A added Commit #2 More files added File B Added Commit #3 Files modified File A modified Commit #4 Files Deleted File A Delete Change log Change log after History Re-Write Commit #1 Initially files added File A added Commit #5 More files added File X added Commit #1 Initially files added File A added Commit #2 More files added File B Added Commit #3 Files modified File A modified Commit #4 Files Deleted File A Delete Local git commit(s) Local Git Repo git clone Developer Commit #1 Initially files added File A added Commit #2 More files added Commit #3 Files modified Commit #4 Files Deleted Developer Removes some files either by purpose or accidentally Blessed Git Repo git push –f origin master Commit #1 Initially files added File A added Commit #5 More files added File X added TeamForge History Protect Detects Rewrite Event 1.Notification: Automatic e-mail to administrators 2.Reporting: Temper-proof audit- trail (who, what, when) 3.Recovery: Self-service resurrection of history rewrite TeamForge automatically secures history snapshots on ‘blessed’ master repository (under “refs/rewrite” or “refs/deleted”), for auditing & recovery.
  • 23. 23 Copyright ©2012 CollabNet, Inc. All Rights Reserved. 24/7 Support Git/Gerrit Training Standards-Compliance Scalability ALM Integration History Protection Code Quality Advanced Git security Git Projects organization Code-review Replication TeamForge = Enterprise-Grade Git Mgmt. + ALM Basic SCM features jGit engine Native engine GitWeb Gerrit With TeamForge and Gerrit, Git is now ready for the enterprise. Realize all the benefits of Git, without compromising governance, security and compliance.
  • 24. 24 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Tackling half baked review requests: Marrying Gerrit and Jenkins master CI Build: OK CI Build: OK A1 local master Verified: -1 (build failed) Verified: +1 (build OK) refs/for/master C2 push C2 C2* C2* push Reviewed: +2 C2* A1
  • 25. 25 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Gerrit – Code Quality Gate Wizard – General Concept
  • 26. 26 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Code Quality Gate Wizard Code Quality Gate Wizard for Gerrit (Gerrit 2.8+) –comes with a bunch of predefined policies and lets you graphically design your own quality gates as easy as defining email filter rules. –Examples: •Four-eye peer review •Legal has to approve copyright file changes •Senior staff has to approve the work of juniors •Democratic feature voting –More details under http://blogs.collab.net/git
  • 27. 27 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Gerrit – Code Quality Gate Wizard – How to launch
  • 28. 28 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Gerrit – Code Quality Gate Wizard – Predefined templates
  • 29. 29 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Gerrit – Code Quality Gate Wizard – Built In Test Mode
  • 30. 30 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Gerrit – Code Quality Gate Wizard – Based on existing changes
  • 31. 31 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Gerrit – Code Quality Gate Wizard – Great Flexibility
  • 32. 32 Copyright ©2012 CollabNet, Inc. All Rights Reserved. 24/7 Support Security Standards-Compliance Scalability ALM Integration History Protection Code Quality Advanced Git security Git Projects organization Code-review Replication TeamForge = Enterprise-Grade Git Mgmt. + ALM Basic SCM features jGit engine Native engine GitWeb Gerrit With TeamForge and Gerrit, Git is now ready for the enterprise. Realize all the benefits of Git, without compromising governance, security and compliance.
  • 33. 33 Copyright ©2012 CollabNet, Inc. All Rights Reserved. 3-Minute Video on History Protection http://www.collab.net/products/teamforge/git-for-the-enterprise Software Downloads (TeamForge, Git + clients) http://www.collab.net/git Git Blogs http://blogs.collab.net/git Learn More
  • 34. 34 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Q&A
  • 35. 35 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Default: All Gerrit review features are turned off Mandatory Review: All code changes have to be reviewed Optional Review: Review feature is turned on but can be bypassed if necessary Custom: Access rights have to be set manually in Gerrit Web UI and will not be overridden by TeamForge User-defined: Possibility to define your own access rights controlled by TeamForge Pre defined & user-defined categories Feature deep dive: Simple RBAC
  • 36. 36 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Rewrite – Example: Accidental Branch Deletion Prepare a fix in local branch which is to be pushed to stable branch on remote. Use this syntax for PUSH to remote Typo in push command...(accidentially added a space) Results in branch deletion. No trace on Web UI on Git server side (stable branch got deleted)
  • 37. 37 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Protection – Alerting 1.Notification: Automatic e-mail to administrators 2.Reporting: Temper-proof audit-trail (who, what, when) 3.Recovery: Self-service resurrection of history rewrite Whenever history gets ‘re-written’, an email gets sent out to ‘Gerrit Administrators’ containing details about old HEAD of branch and new HEAD after ‘re-write’.
  • 38. 38 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Protection – Reporting (Audit Log) Audit Log containing all History Rewrite Events is accessible through TeamForge Web UI 1.Notification: Automatic e-mail to administrators 2.Reporting: Temper-proof audit-trail (who, what, when) 3.Recovery: Self-service resurrection of history rewrite
  • 39. 39 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Protection – Reporting (Web UI) 1.Notification: Automatic e-mail to administrators 2.Reporting: Temper-proof audit-trail (who, what, when) 3.Recovery: Self-service resurrection of history rewrite
  • 40. 40 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Protection – Reporting (Command Line) 1.Notification: Automatic e-mail to administrators 2.Reporting: Temper-proof audit-trail (who, what, when) 3.Recovery: Self-service resurrection of history rewrite
  • 41. 41 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Protection – Reporting (Eclipse) 1.Notification: Automatic e-mail to administrators 2.Reporting: Temper-proof audit-trail (who, what, when) 3.Recovery: Self-service resurrection of history rewrite
  • 42. 42 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Protection – Recovery (Web UI) 1.Notification: Automatic e-mail to administrators 2.Reporting: Temper-proof audit-trail (who, what, when) 3.Recovery: Self-service resurrection of history rewrite
  • 43. 43 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Protection – Recovery (Command Line) 1 Run this command on git command line 2 Copy HEAD SHA1 of branch created after history ’re-write’ 3 Use copied SHA1 to create new local branch in Git Push this local branch to remote ‘blessed reposiotry’ Resurrected branch via command line is now available for all user having atleast read access(view only) for this Git repository Fetch SHA1 of rewritten history from server 4 5 Alternatively users having permissions to create a new branch can restore history by using their git client 1.Notification: Automatic e-mail to administrators 2.Reporting: Temper-proof audit-trail (who, what, when) 3.Recovery: Self-service resurrection of history rewrite
  • 44. 44 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Protection – Administration Gerrit Config-Option allows you to protect all Git repositories hosted by TeamForge: Not even TeamForge Site Admins can override
  • 45. 45 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Rewrite – Why Blocking is NOT the Answer Legitimate use cases –Developers •Deleting accidently committed file(s)/change(s) •Change appearance of commits –squashing multiple commits into unified single commit –change order of commits –Build / Release managers / Developers •Removing Copyrights/ Intellectual Property(IP) related resources from code base •Removing large file(s) •Removing feature branch(es) created temporarily and already merged Not (so) Legitimate use cases –Developers / Build / Release Managers •Remove somebody else’s changes without leaving any trace •Pretending someone else’s change as own (forgery) •Accidentally removing branches
  • 46. 46 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Rewrite – Why Blocking is NOT the Answer Legitimate use cases –Developers •Deleting accidently committed file(s)/change(s) •Change appearance of commits –squashing multiple commits into unified single commit –change order of commits –Build / Release managers / Developers •Removing Copyrights/ Intellectual Property(IP) related resources from code base •Removing large file(s) •Removing feature branch(es) created temporarily and already merged Not (so) Legitimate use cases –Developers / Build / Release Managers •Remove somebody else’s changes without leaving any trace •Pretending someone else’s change as own (forgery) •Accidentally removing branches
  • 47. 47 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Git History Rewrite – Why Blocking is NOT the Answer Legitimate use cases –Developers •Deleting accidently committed file(s)/change(s) •Change appearance of commits –squashing multiple commits into unified single commit –change order of commits –Build / Release managers / Developers •Removing Copyrights/ Intellectual Property(IP) related resources from code base •Removing large file(s) •Removing feature branch(es) created temporarily and already merged Not (so) Legitimate use cases –Developers / Build / Release Managers •Remove somebody else’s changes without leaving any trace •Pretending someone else’s change as own (forgery) •Accidentally removing branches
  • 48. 48 Copyright ©2012 CollabNet, Inc. All Rights Reserved. •TeamForge + Gerrit is a powerful foundation for Enterprise Git •Git History Rewrite covers branch deletions and forced pushes, two very powerful, often needed but quite dangerous operations which might lead to data loss and tampering •TeamForge 6.2 with Gerrit introduced History Protection •History protection ensures that potentially unnoticed events, such as remote branch deletions and forced pushes, are now detected and fully recoverable, any modifications to Git code and repositories are securely recorded with tamper-proof audit logs •Recovery is possible from a Web interface at the push of a button, and using an ordinary Git client, IT operations teams don’t have to be involved Git History Protection - Summary
  • 49. 49 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Motivation: Bring the git push notifications mechanism from the gitmultimail script to TeamForge Feature deep dive: Notifications
  • 50. 50 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Feature deep dive: Notifications
  • 51. 51 Copyright ©2012 CollabNet, Inc. All Rights Reserved. Appendix – History Rewrite, versus Git Reflog Git reflog TeamForge Git Integration with ‘History Protect’ Accessibility Requires direct access to file system on server where ‘blessed Git repository’ is hosted which is very unlikely in huge organizations and will keep the server administrators busy ‘Self –Service’ approach. Users with appropriate permissions in TeamForge can find out/resurrect deleted/rewritten branches by themselves, decreasing work load of server administrators. Gerrit Administrators can also permanently delete selected branches/tags. Signal-to- Noise Ratio reflog records <all> changes in the repository •Any push (also ordinary fast forward) •Any merge •Any Branch creation/deletion •Any Tag creation / deletion Finding out about history rewrites/deleted branches is like searching for a needle in a haystack History Protect only reports •Deleted branches/tags •History rewrites (non fast forward pushes) Notification No notification •Email to Gerrit Administrators •Audit log entry whenever branch/tags gets •Deleted •Re-written (non fast forward) •Resurrected •Permanently deleted Ease of use •Only manually configurable by administrator having file system access •To be configured for each and every repository •Restoring requires running git commands on server •Pre-configured in TeamForge/Gerrit •Configurable for all repositories by setting site-wide config option or on a per repository basis •User with appropriate permission can restore history using Gerrit WebUI / Git client Protection against object pruning/reflog expiration RefLog expiration and gc pruning settings have to be manually configured by server administrator. Only possibility to not lose commits no longer referenced in a branch is to set both values to <unlimited> which will consume huge amounts of disk space, slows down garbage collection and does not allow to permanently delete specific commits (all or nothing). Preserved commits will never pruned by garbage collection unless permanently removed using Gerrit Web UI. No need to keep a large ref log. Garbage collection will run faster since all commits are still referenced in the repo.