Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Diffy with Enterprise Grade

200 views

Published on

Slides from Gerrit User Summit 2017. Diffy With Enterprise Grade.

  • Be the first to comment

  • Be the first to like this

Diffy with Enterprise Grade

  1. 1. Diffy with Enterprise Grade TeamForge Git/Gerrit Integration Eryk Szymanski CollabNet Engineering Team, Berlin, Germany
  2. 2. TeamForge - ALM Platform ALERT MONITORING HEALTH EVENT WORK ITEM SERVICE DESK COMPLIANCE AUDIT SECURITY CHECK DEPLOYMENT EPIC STORY TASK COMMIT CODE REVIEW CI BUILD BINARY TEST/SEC PLAN CODE BUILD TEST RELEASE DEPLOY OPERATE MONITORREVIEW RELEASE PACKAGE chaosmonkey buildcodeplan release & deploymonitoroperate
  3. 3. …and the Enterprise
  4. 4. Enterprise Grade ü 24/7 Support ü Git/Gerrit Training ü Standards-Compliance ü Scalability ü ALM Integration ü History Protection ü Code Quality Gates ü Enterprise Replication ü Modern Code Browser ü Flexible Workflows ü Advanced Git Security ü Git Projects Organization ü Code-Review ü Replication ü Basic SCM Features ü Git 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.
  5. 5. Enterprise Grade Integration of existing tools Standards, security and audit compliance Scalability and manageability at scale
  6. 6. Enterprise Grade Searchability – across all artifacts, including Code Search across multiple repositories, Gerrit instances and other SCM tools such as CVS or Subversion Traceability – associating the source code with requirements, issues, documents, tasks and other artifacts. RBAC – Role Based Access Control - for each application's concepts, such as documents, file releases, trackers or discussion forums, one can assign permissions globally based on user roles
  7. 7. Git/Gerrit Integration • Managed by TeamForge: – Multiple Gerrit instances – Gerrit projects (repositories) – Users, passwords and SSH keys • Make use of TeamForge features: – Use TeamForge RBAC for Access Rights – Enable Source Code Search and Commit Objects – Make sure it is secure and audit compliant • Enable TeamForge look and feel • Keep in mind that Gerrit is also a Git server Our mission is to make Gerrit a first-class citizen of TeamForge ecosystem
  8. 8. Git/Gerrit Integration • Support Open Source – Give back to the community • If it is Gerrit core change, open source it – Do not fork • Stay as close to current Gerrit as possible – It is ok to have patches on top of vanilla Gerrit – But those are regularly rebased as Gerrit progresses • Everything else goes into the plugins Based on Gerrit 2.14.3 + some patches + 6 proprietary plugins
  9. 9. Git/Gerrit Integration - Features Users & RBAC Notifications History Protection Quality Gates Replication Commit Associations Pull requestCode browser
  10. 10. Users and RBAC • Users: – Managed by TeamForge – Emails, SSH keys and Passwords are stored there – Single Sign On • RBAC: – Map Gerrit Access Rights onto TeamForge SCM permissions – Provide pre-defined repository policies so anyone can start to work with Gerrit within a few steps – Allow power users to use advanced features Manage users in TeamForge and shield them from Gerrit’s complexities by using generic TeamForge RBAC model
  11. 11. Commit Delete Admin View Read Push Force-Push Push-Tag Push-Branch Publish-Draft Create-Draft Create-Branch/Tag CodeReview Submit Rebase Verified Forge-Author Forge-Identity O O O O 28+ access rights SCM Permissions Access Rights Gerrit RBAC
  12. 12. Commit Delete Admin View Read Push Force-Push Push-Tag Push-Branch Publish-Draft Create-Draft Create-Branch/Tag CodeReview Submit Rebase Verified Forge-Author Forge-Identity O O O O 28+ access rights Optional Review No review SCM Permissions Repository Policies Access Rights Gerrit Your Policy RBAC
  13. 13. Commit Delete Admin View Optional Review No review Read Push Force-Push Create-Branch Create-Tag SCM Permissions Repository Policies Access Rights Gerrit Your Policy RBAC
  14. 14. Commit Delete Admin View Optional Review No review Read Push Create-Branch Create-Tag Publish-Draft Create-Draft Merge Rebase Verify CodeReview SCM Permissions Repository Policies Access Rights Gerrit Your Policy RBAC
  15. 15. Commit Delete Admin View Optional Review No review Your Choice SCM Permissions Repository Policies Access Rights Gerrit Your Policy RBAC
  16. 16. RBAC – adjusting repository policy Your own policy
  17. 17. Even more RBAC Role Members Site Admin Anonymous Users Project Members Logged-In Users Non-Restricted Users < CollabNet TeamForge Other Git Solutions
  18. 18. Git Style Notifications Bring the Git push notification mechanism from git-multimail script to TeamForge
  19. 19. Git Style Notifications
  20. 20. 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) • 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 commits 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
  21. 21. History Protection – Code Browser UI
  22. 22. Associations On Commits
  23. 23. Git Subversion When & by whom What was done Associations On Commits
  24. 24. Quality Gates
  25. 25. Quality Gates
  26. 26. Quality Gates • Comes with a bunch of predefined policies and lets you graphically design your own quality gates as easy as defining email filter rules. • Makes it easy to test and deploy the rules. • Some Examples: – Four-eye peer review – Legal has to approve copyright file changes – Senior staff has to approve the work of juniors – 1 +1 = 2 in Code Review. Gerrit plugin that allows to define Submit Rules without Prolog using Graphical Wizard
  27. 27. Quality Gates – GitEye
  28. 28. Replication • Easy to setup: – Replication slaves register themselves automatically – Start/stop replication for repo is easily available from UI – No need to modify the replication.config • Provides Monitoring: – Replication status shown live in UI – Instant info on whether it is working or not – Detailed history available on past replication events • Adjust the Clone URL in the way that fetch comes from replica and push goes to master. • From Admin perspective works no different than Subversion Based on Gerrit replication plugin but goes beyond
  29. 29. Replication – Repository view
  30. 30. Replication – Replica view Replication history gives more details on past replication events Status Event type Date of eventFilter by date
  31. 31. Replication - Repository view Replication status and commit count for both Subversion and Git
  32. 32. Code Browser • Seamless UI and Consistent flow for TeamForge Users • One can use Pull Request or other Gerrit features without even seeing Gerrit • Everything happens in one place - TeamForge Code Browser
  33. 33. Code Browser - Graph View
  34. 34. Code Browser – Branch comparison
  35. 35. Pull Request • Pull requests are popular – Our customers ask for it • General familiarity with pull request model – Easier onboarding for new TeamForge customers – But those are regularly rebased as Gerrit progresses • Support feature branch development model – Final big-bang review before the merge – One can even combine it together with Gerrit model Deliver interface to enable easy onboarding for people who are already familiar with Pull Request and do not know Gerrit
  36. 36. Pull Request
  37. 37. Learn more • CollabNet blogs about Git & Gerrit – http://blogs.collab.net/git • GUS 2014: Gerrit gets enterprise grade – https://www.slideshare.net/eryksz/diffy-gets-enterprise-grade-32675346 • GUS 2015: You shall not pass. Control your code quality gates with a wizard – https://www.slideshare.net/eryksz/you-shall-not-pass-control-your-code-quality-gates-with-a-wizard • GUS 2016: Bringing pull request to Gerrit – https://www.slideshare.net/eryksz/bringing-pull-request-to-gerrit
  38. 38. Thank you Questions?

×