DEV Community

Cover image for How to Prepare for Trunk Based Development
Paul Gerst
Paul Gerst

Posted on

How to Prepare for Trunk Based Development

You have done your research. You fully understand trunk based development. You are sure this is right for your team. Now you are ready to move your organization to it. To prepare, here are a few items to consider.

Maybe most importantly, embrace a shift in culture, which begins with welcoming continuous integration. Encourage your team to consistently push changes in code to the main branch. You should advocate for your team to break code changes into small, but manageable, pieces.

Second, take a look at your technical infrastructure. Ensure you can do robust testing. Testing, unit, integration and end to end are required to make sure you have quality code and are able to catch regressions. Your organization needs to be able to execute a total suite of automated tests.

To review new features in production, make sure to utilize feature flags. By doing this, you will be able to gradually release new features and review feedback before fully deploying. One important item is to establish a continuous integration/continuous deployment pipeline. Then, you can build, test, deploy changes to code in production.

Next, establish clear processes. Make sure everyone understands your workflows. You can start with a clear branching strategy. Following this, set up a process for code review that is rigid. Doing this allows your team to embrace knowledge sharing, quality of code and attachment to code standards. Your team should be encouraged to, as soon as possible, merge code changes into the main branch, which will lower chances of conflict.

Be supportive and provide more education and further training. Help your entire team completely understand the concepts of trunk based development. Make sure your team knows why you are moving to this approach. Have an open atmosphere and listen to issues raised by your team members.

Finally, have some patience. Scale gradually after all your team members are comfortable. A pilot program is a good way to monitor issues that occur along the way. Everyone wants to win. By undertaking some planning and following a few steps, your team can easily transition to trunk based development. Then, everyone does win.

Top comments (0)