[groups] newGroupsVisibleToAll = true
Why is SAP using Gerrit?
Why is SAP using Gerrit?
Why is SAP using Gerrit?
Why is SAP using Gerrit?
Why is SAP using Gerrit?
Why is SAP using Gerrit?
Why is SAP using Gerrit?
Why is SAP using Gerrit?
Why is SAP using Gerrit?
Further Gerrit instances in preparation.
Everyone at SAP can contribute to any SAP project ➊!
➊ any project hosted in Gerrit
[groups] newGroupsVisibleToAll = true
2 admins spend a few hours per week on Gerrit administration
Requirements for development infrastructures
For each code change it must be possible to find the person that was doing the change.
Traceability
GC script automatically sets:
gc.reflogexpire = never gc.reflogexpireunreachable = never
Every release build must be reproducable.
Force Push for release tags is BLOCKED on All-Projects
Special processes are enforced for release branches:
[receive] maxObjectSizeLimit = 20 m
support to archive repositories is missing
Offer Gerrit as Git Service in the SAP HANA Cloud Platform.
Offer Gerrit as Git Service in the SAP HANA Cloud Platform.
Offer Gerrit as Git Service in the SAP HANA Cloud Platform.
Map tenant to top-level folder in Gerrit.
Map tenant to top-level folder in Gerrit.
Tenant users must only see projects of their own tenant.
/** Can this user see this project exists? */ public boolean isVisible() { if (user instanceof InternalUser && !isHidden()) { return true; } if (!canPerformOnAnyRef(Permission.READ) || isHidden()) { return false; } Project p = state.getProject(); for (ProjectFilter e : visibilityExtensions) { if (!e.accept(p)) { return false; } } return true; }
/** * An extension to the standard project visibility check */ public interface ProjectFilter { public boolean accept(Project project); }
class TenantAsTopLevelFolder implements ProjectFilter { private final Provider<CurrentUser> currentUser; private final DomainDbClient checker; @Inject public TenantAsTopLevelFolder(Provider<CurrentUser> currentUser, DomainDbClient checker) { this.currentUser = currentUser; this.checker = checker; } @Override public boolean accept(Project project) { if (currentUser.get().getCapabilities().canAdministrateServer()) { return true; } String projectName = project.getName(); int n = projectName.indexOf('/'); if (n == -1) { return false; } String tenant = projectName.substring(0, n); String userName = currentUser.get().getUserName(); return checker.hasGitAccess(userName, tenant); } }