Trunk-based development

DORA Trunk-based development

Get Started. It's Free
or sign up with your email address
Trunk-based development by Mind Map: Trunk-based development

1. Understand

1.1. What

1.1.1. A pattern for branching and merging

1.2. Why

1.2.1. Branching is easy, merging is harder

1.2.2. Structure the dev team collaboration

1.3. How

1.3.1. 2 main patterns

1.3.1.1. Feature branches

1.3.1.1.1. how

1.3.1.1.2. timeline

1.3.1.1.3. iconic examples

1.3.1.2. Trunk base dev

1.3.1.2.1. how

1.3.1.2.2. timeline

1.3.1.2.3. iconic examples

2. Measure

2.1. <3 active branches

2.2. Merge to trunk < 1d

2.3. No

2.3.1. code freezes

2.3.2. integration phases

2.4. synchonous code review

3. Pitfalls

3.1. Code review

3.1.1. Heavy

3.1.1.1. lead to

3.1.1.1.1. larger batch of work

3.1.1.1.2. reviewer to procrastinate

3.1.1.1.3. too complex review = defect to escape

3.1.1.1.4. aka spiral to dimish trunk base dev

3.1.2. Asynchronous

3.2. Missing automated local test

3.2.1. enforce precommit actions

4. Enabled by

4.1. Develop in small batches

4.2. Fast automated test

4.2.1. When

4.2.1.1. on each commit (before)

4.2.1.2. on merge (after)

4.2.2. Where

4.2.2.1. often locally

4.2.2.2. remote possible

4.2.3. Why

4.2.3.1. Make sure system is always working

4.3. As part of Continuous Integration paradigm

4.3.1. CI = Trunk base dev + Fast Automated tests + build

4.3.2. Dev responsible of BUILD always green

4.3.2.1. On BUILD broken

4.3.2.2. Stop current work

4.3.2.3. Fix / revert the change in a few mins

4.4. Fast build

4.5. Have a core group of mentors to advocate