CI/CD for Small Teams: A Pipeline That Pays for Itself
You do not need a platform team to release safely. Seven steps, most of them an afternoon's work, that turn deployment from an event into a button, and the order to add them in.
BunnyDevs5 min readCloud & Security
In many small teams a release looks like this. One person, usually the most senior, runs a series of commands from their laptop. Everyone else waits. It is never done on a Friday. When it goes wrong, the fix is done the same way, in a hurry.
A simple pipeline removes the fear, and it costs less than one bad release.
What you are aiming for
- Any team member can release, at any time, the same way.
- Every change has been built and tested before a person reviews it.
- You can see a change running before it is live.
- Going back takes one click and has been practised.
That is all. You do not need containers, clusters or a new vocabulary.
The seven steps, in order
1. One main branch that always works. Short-lived branches, merged often through a pull request. Long branches are where painful merges come from.
2. A build on every push. Start with the simplest check: does it compile, do the types agree, does the formatter pass? This catches a surprising amount, and takes an hour to set up on GitHub Actions or a similar service.
3. Tests on the paths that matter. Choose five journeys: sign up, sign in, the core action, pay, and the one that broke last time. Run them in a real browser or emulator. Resist adding more until these are solid.
4. A preview for every change. Many hosts give each pull request its own link. Designers, testers and clients can look at it before it is merged. This one step improves more conversations than any tool we know.
5. Deploy with a button. Merging to main releases to staging. A second, deliberate step releases the same build to production. The same build, not a new one, because rebuilding can produce something different.
6. Roll back with a button. Keep previous versions available and switch between them. Test it on a quiet Tuesday. A rollback that has never been tried is a hope.
7. Watch it after it lands. Error tracking, an uptime check and one alert that reaches a phone. Look at the error rate ten minutes after each release.
The security checks that cost nothing
Add these to the same pipeline. They take minutes.
- Dependency alerts, with updates proposed automatically
- Secret scanning, so a key committed by accident fails the build
- A test that tries to read someone else's data and expects to be refused
- Protected main branch, so nobody can push around the checks
- Separate credentials for the pipeline, limited to deploying, and different for staging and production
That last one matters. The pipeline can change your live system, so its access is worth protecting as carefully as an administrator's.
Database changes, the part that bites
Code can go back in a second. Data cannot. Make changes in steps that work with both the old and new code.
- Add the new column, leave the old one.
- Release code that writes to both and reads the old.
- Copy existing data across.
- Release code that reads the new one.
- Remove the old column later, when nothing uses it.
It feels slow. It is the difference between a rollback that works and one that loses orders.
What to skip, for now
| Skip | Until |
|---|---|
| Kubernetes | Several teams and real scaling needs |
| A large test suite | The five journeys are stable |
| Automatic production releases | You trust the alerts and the rollback |
| Many environments | Staging and previews are not enough |
| Feature flag platforms | A simple setting in the database is not enough |
Every tool you add is something to maintain. Add one when its absence hurts.
Mobile apps
The same idea with one difference: you cannot roll back a version on someone's phone. So release gradually. Build and sign automatically, send every merge to testers, roll out to a small share of users first, and watch the crash rate before widening. Keep risky features behind a switch that you control from the server.
How to introduce it
Do not announce a project. Add step two this week. When it catches something, show people. Add previews next, because everyone likes them. By the time you reach the deploy button, nobody will want to go back.
Keep a short page called "How we release" in the repository. If it needs more than ten lines, the process needs simplifying.
What it gives you
Smaller changes, because releasing is easy. Fewer bugs, because small changes are easy to understand. Calmer people, because going back is easy. And a team where the release no longer depends on one person being at their desk.
If you would like help setting it up, our cloud and DevOps service starts with a look at how you release today.