How to transition a team from Git-flow to trunk/CI-CD?
First, there are regular problems that occur in and around releases, so this isn't busy work, some form of intervention is necessary, and because managing branch hell is part of the problem and something that git-flow is known for, moving to automation with continuous release sounds like a reasonable step.
So my current plan is:
Step 1: Keep current release schedule, but treat develop as if it were main. Add feature flags and minimum daily commit to develop.
Step 2: Add CI/CD pipeline to non-live deployment, like blue green deployment.
Step 3: Add unit/integration test gates to deployment of step 2.
Step 4: Stay in holding pastern for few weeks to deal with any emergent problems, testing failures, etc
Step 5: Migrate fully to trunk based. Eliminate develop.
Any thoughts, criticisms, feedback?
5 comments
[ 3.4 ms ] story [ 20.7 ms ] threadI’m only trying to make sure I understand the problem otherwise I cannot evaluate the solution. Plus it would have make it very hard to sell it to me, if I was to take the decision.
Second, when a release is made and a bug is found there are branches mad from main (not develop) to fix the bugs, that must then be merged into develop (referred to as a merge-back) which increases surface area for errors as well as more time spend untangling the emerging web of branches. Now, in the hands of a capable engineer this isnt a massive lift, but also there are processes to automate all of this and that capability would be better spent day dreaming about a side project as far as I am concerned.
Have I persuaded you?
We never experimented with ci/cd but that was done to avoid overhead..
So here’s the branch layout: main branch(always releasable), develop (into which personal dev branches/feature branches are merged), and then we had release branches. No automation of any kind but this is India and we had a lot of manual labor and manpower at disposal. YMMV so take my advice with a pinch of salt.
I’d say keep the git-flow but structure things differently. git-flow has a lot of modern benefits!
Try “we need to ship more frequently (with the end goal being CI/CD) because our releases cause problems all the time and it’s very expensive” or something along those lines. Ask the engineers on your team to determine an approach that works for them, run it by you (your job in this is to manage risk/timeline/cost, not get them to do it your specific way), and then do it.
However, it's important to discuss and collaborate on the decision-making, planning, and execution process during team meetings. Avoid making unilateral decisions and imposing workloads on others.
Initiate the discussion by acknowledging a common issue that affects workflow and asking for input from the team on how to address it and what improvements would be beneficial. Encourage the team to contribute to finding a solution.