š„Writing Dozens of Tools to Migrate an Enterprise from BitBucket to GitHub
--
This blog series focuses on presenting complex DevOps projects as simple and approachable via plain language and lots of pictures. You can do it!
Hey all!
These blog normally zooms in on particular technologies or use cases, but today weāre going to zoom out. Way, way out. I was recently (well, 6 months ago), to migrate an enterprise from an internal Stash/BitBucket server to a GitHub Organization. Full stop, good luck!
That project is nearly complete. As part of gathering information, preparing the new GitHub tenant, and executing the migration, Iāve had the opportunity to write dozens of bespoke tools. These tools are intended to gather information, build reference files that downstream tools will use, or to directly update settings or copy code and other repos. They create PRs in GitHub, they update Jenkins pipelines, they read and set settings in Jenkins, GitHub, and BitBucket.
As a collection, they are what enables this very large project to move forward. Letās talk about some of the tools I remember writing (there are surely more I donāt!) and what they do! š
Tooling Note: I Build My Own
Note for folks reading ā there are ocassionaly tools available on these platforms or in public that could gather this information for us. However, I am reticent to use external tooling ā I donāt know perfectly how it works, I donāt trust it fully, and itās often not as customizable as writing my own tools.
Therefore, I write my own tools whenever possible.
Who Are The Active Users?
The first question of most migrations is licensing. It takes a long time to purchase things, and can be expensive, so we want accurate counts for licenses. So, a simple question ā Which users (and how many) are active in our projects on our internal BitBucket server?
We donāt want to buy too many licenses, and we are only first moving one division to GitHub. So we need to see how many users are āactiveā. That āactiveā is hard to define. Have they opened a PR? Commented on a PR? Reviewed a PR? Then theyāre āactiveā. BitBucket doesnāt have an easy report for that, but Iā¦