Software delivery has changed a lot over the years! Whatโs the difference between continuous delivery and continuous deployment? ๐ค
And is a feature live
just because itโs deployed? ๐คจ
Letโs look into this together with some modern DevOps ๐
๐ณ Trunk-Based Development
Trunk-based development (TBD) is a software development strategy where everyone works from a single branch (trunk) โ usually main
. Itโs fast, lean, and fits in modern delivery practices.
๐ง How it works:
- Developers commit to
main
(or short-lived branches that are merged quickly to themain
branch) - The
main
branch is always deployable - Features are hidden behind flags until theyโre ready to go live ๐
๐ก Why it matters:
Trunk-based development encourages:
- Fewer merge conflicts ๐ โโ๏ธ
- Smaller, safer changes โ
- Faster feedback loops ๐
โ Core Principles of TBD
- Single source of truth: All changes go through the trunk (usually
main
) - Short-lived branches (if any): Avoid long-running feature branches. Merge fast! ๐๐ปโโ๏ธ
- Continuous integration: Changes are merged and tested constantly
- Always deployable: The trunk is always in a releasable state โ even if features are hidden behind flags
This helps set-up a clean, automated release process ๐
๐งฑ Continuous Delivery vs ๐ Continuous Deployment
We often use these terms interchangeably, but theyโre not the same thing. Letโs break it down ๐
Continuous Delivery ๐งบ | Continuous Deployment ๐ | |
---|---|---|
Code goes to prod? | Only if you say so ๐ฑ๏ธ | Automatically! ๐ Yay! |
Human involvement? | Yes โ manual release decision ๐โโ๏ธ | Nope โ all tests pass? It ships ๐ข |
Speed to users | Fast โก๏ธ | Fastest ๐ |
Risk level | Lower (more control) ๐งฏ | Higher (but with confidence!) ๐ช |
๐ฏ TL;DR:
Continuous Delivery = Code is ready to go live.
Continuous Deployment = Code automatically goes live.
๐ต๏ธ Deployment vs ๐ Release
Just because your code is deployed doesnโt mean itโs released. Letโs look into this further together:
๐ฉ๐ปโ๐ Deployment
- Code is in
production
๐ฅ๏ธ - But might be hidden behind a feature flag ๐
- Invisible to users ๐ป
๐๐ปโโ๏ธ Release
- Users can see and use the new feature ๐ฅณ
- Controlled by toggles, permissions, or gradual rollouts ๐ฆ
๐ฆ Example:
You deploy a new dark mode toggle ๐ โ the code is live but hidden.
Later, you release it to users by flipping a switch ๐.
๐ Why Separating Deployment and Release is Helpful
- Safer launches ๐ง
- Gradual rollouts (hello canary releases ๐ค, blog coming soon to talk more about this!)
- Fast recovery โ you can turn features off without re-deploying ๐
๐ Wrapping Up
Modern software delivery is all about small, safe, and speedy changes.
Remember:
โ Deployed doesnโt mean released! ๐ Deployment isnโt delivery
๐ง Fast delivery is a mindset, not just a tool
Have a nice day ๐ฅฐ