The solution of merge hell in monorepo
summary
Bitbucket creates {pullRequestId}/merge branches so every PR triggers a simulated-merge build and with ~300 open PRs that causes quadratic rebuilds; a custom bb plugin using an independency graph intercepts Bitbucket events, caches merge-build results, filters builds by included/excluded paths and per-project CI lists, and delegates real runs to TeamCity only when needed. It cuts started builds by >4x (avoiding ~3,000 builds in three days) and saves roughly 40 engineer-days of CI time, and runs in production.
AI-written summary · about
chapters (9)
- 0:00Introduction and company overview
- 7:42Monorepo basics and branching model
- 10:11Problem: Merge hell in monorepo
- 13:33Solving merge hell with CI plugin
- 23:03Plugin features and developer convenience
- 24:06Performance results of the plugin
- 26:17Parallel merge optimization
- 28:04Key takeaways and conclusion
- 29:31Q&A session







