This presentation explains why and what for we should use:
1) Trunk Based Development
2) Pre-commit Code Review
3) Gerrit
4) How they can be used together
This presentation was shared in one of Java User Groups in Astana, Kazakhstan
28. What is Stable build?
Changes do not have any bugs
They do not fail existing tests
They have good test coverage
CI jobs are green
Unit/Integration/System/End-
To-End tests passed
Existing functionality works
28
29. I wanna see everything in one
place
Feedback from teammates
Feedback from Team Lead
Feedback from Architect
Check that build is not broken
Check any type of tests
Feedback from Architect
New violations and errors
Any blocker issues
Any static analyse
29
36. Trunk Based Development
Everyone Develops in the trunk
Bug fixes too
No Code Freeze
No Merge Hell
Build never broken. It's always ready to
be released
36
42. Pull requests are not pure
pre-commit review
You can integrate it with
CI. Some have CI out of the
box
Pull requests do not
show Static Code
Analyse comments
Pull/Merge Requests
42
44. Who is Ninja?
Always ready to hear feedback
from others and make changes
Fixes build before it breaks
main branches builds
Removes all SonarQube
violations
Knows how GIT works
Ready to share knowledge and
help
Checks
Unit/Integration/System/End-
To-End/UI tests
44
45. What is Gerrit?
Created for Android
Development and now it's
in Google
And lots of other companies
45
50. Gerrit Roles Model
Group Label Range
Registered Users Code-Review -1..+1
Team Leads Code-Review -2..+1
Architects Code-Review -2..+2
Non-interactive
users
Code-Review -1..+1
“ For example, only Architects
can allow to make a merge
50
51. Patch Set
One code change, (be it a feature or
a bugfix, ) is one commit. Use
Ammend to update it.
git push gerrit
HEAD:refs/for/master
When it's
ready for
review
51