The DevOps lifecycle
Plan, code, build, test, release, deploy, operate, monitor.
Part 1: The problem
QuickCart releases once a month. For three weeks, everyone writes code. Then the team merges it all, fixes the conflicts, and hands a build to Noor, who tests it by hand for a week.
On release night, the whole team joins a call at 9pm. The release goes out at 11pm. At 11:20pm, some customers are being charged the wrong total.
There are forty changes in the release. Nobody knows which one did it. It takes until the next afternoon to find a promo-code change written four weeks earlier. The fix will go out in next month’s release.
QuickCart’s problem isn’t bad code. It’s that each change waits for thirty-nine others, and travels round the whole process with them.
Part 2: The idea
Every change to software goes through the same eight stages, whether it’s a new app feature or a one-line fix. People usually draw them as a loop.
The eight stages
| Stage | What happens | In QuickCart’s app world |
|---|---|---|
| Plan | Decide what to build next | Picking tickets for the sprint |
| Code | Write the change, and have someone review it | A pull request |
| Build | Turn the code into something that can run | Archiving the app |
| Test | Check it works and hasn’t broken anything else | Unit tests, then TestFlight |
| Release | Decide it’s allowed to go to users | Submitting for review |
| Deploy | Put it on the servers | The store making the build available |
| Operate | Keep it running: capacity, fixes, incidents | Answering support tickets |
| Monitor | Watch what it does: errors, speed, usage | Crash reports and analytics |
The first four are often called dev, and the last four ops. The whole point of DevOps is that one team owns the whole loop. The people who write a change see it run, and see it fail.
Release and deploy are different things
They sound the same, but they’re separate steps. Release is the decision that a change may reach users. Deploy is putting the new code on the servers. Keeping them apart is useful: later in this module, feature flags let you deploy code today and release the feature next week.
The loop is only as fast as its slowest wait
Look at QuickCart’s promo-code change. The work on it took about two days. But it took 35 days to reach customers:
| Stage | Working on it | Waiting |
|---|---|---|
| Code | 2 days | 19 days, for the other 39 changes |
| Build | 1 day of merge conflicts | |
| Test | 1 hour of testing this change | 7 days, for everything else to be tested |
| Release | 4 days, for the monthly window | |
| Deploy | 2 hours | |
| Total | about 3 days | about 30 days |
Most of its life, the change was sitting in a queue. That’s normal for big batches. Making people work faster barely helps. Making the batch smaller does.
Why small batches win
| With big batches | With small batches |
|---|---|
| A bug could be in any of forty changes | A bug is almost certainly in the one change that just shipped |
| Feedback arrives weeks after the code was written | Feedback arrives while the author still remembers the code |
| Release day is scary, so it happens rarely, so batches grow | Releases are boring, so they happen often, so batches stay small |
| Merging three weeks of work causes conflicts | Merging a few hours of work rarely does |
Small batches only work if each trip round the loop is cheap. That’s why the rest of this course automates the build, the tests and the deploy.
Part 3: See it
Follow one change round the loop. First with small batches, then switch to Big batches and send another. Watch the clock in the middle, and where the change gets stuck.
What to notice: in big batches, the red stages aren’t slow because anyone is lazy. The change is waiting: for other changes, for testers, for a release window. The work itself takes about the same time in both runs.
Part 4: Do it
Free — you only read your own project’s history.
You’ll take one change you shipped recently and map its trip round the loop: when it started, when it reached users, and where it waited. This is called a value stream map, and it’s how teams find their slowest step. About 15 minutes.
You need a project in git that you’ve shipped something from, such as your own app. If you don’t have one, use QuickCart’s numbers from the table in the idea and do the last two steps.
Pick one change
Choose something small that reached users in the last month or two: a bug fix or a small feature. Write down one word that appears in its commit messages, like
photoorcheckout.Find when the work started
Open the terminal in your project’s folder, then list the commits that mention your word, oldest first. Put your own word in place of the highlighted one:
Terminalgit log --reverse --format="%h %ad %s" --date=short -i --grep="photo"Part What it means git loglist commits, newest first --reverseoldest first instead, so the first line is when the work started --format="%h %ad %s"show each commit as its short ID ( %h), its date (%ad) and its message (%s)--date=shortprint dates as year-month-day -iignore upper and lower case when searching --grep="photo"only commits whose message contains this word. Replace it with yours You should see19f7ca8 2026-08-31 Add photo field to menu items 29c9c89 2026-09-02 Resize photos on upload 15374d9 2026-09-03 Merge pull request #41 from menu-photosYours will show your own commits. The first line is when coding started. A line like the last one, a merge, is when the change joined the main branch.
Find when it reached users
This part isn’t in git. Look where your team records releases: the App Store Connect or Play Console release history, a release notes page, or a deploy log. Write down the date the change was available to users.
Fill in the map
Copy this table into a note and fill it in for your change. Guess where you have to; rough days are fine.
Stage Working on it Waiting Waiting for what? Code, including review Build Test Release Deploy Total Add up each column.
You should seeTwo totals. For most teams, Waiting is several times bigger than Working on it.
Find the biggest wait, and one way to shrink it
Circle the row with the biggest wait. These are the usual causes, and the lessons that fix them:
If it waited for The usual fix Where it’s taught Other changes, to release together Release each change on its own This module Someone to test it by hand Automated tests on every change Continuous integration An approval meeting or release window Automated checks as the approval, and safer ways to release Ways to release Someone to run the deploy A pipeline that deploys Continuous delivery A feature being finished Ship it switched off, behind a flag Feature flags Write one sentence: “Our biggest wait is ___, and we could shrink it by ___.”
Clean-up step: Clean up
Nothing to delete.
git logonly reads history; it never changes anything.Keep your map. In the next lesson you’ll turn the same history into four numbers that measure how well a team delivers.
Part 5: Check yourself
QuickCart ships forty changes together once a month. A bug appears straight after the release. Why is it slow to fix?
In most slow delivery processes, where does a change spend most of its time?
Why is the lifecycle drawn as a loop and not a straight line?
What is the difference between "release" and "deploy" in the loop?
What makes smaller batches practical, rather than just more work?
Part 6: Cheat sheet
| Stage | In one line |
|---|---|
| Plan | Decide what to build next, using what monitoring showed |
| Code | Write it, and have it reviewed |
| Build | Turn code into something that runs |
| Test | Check it works and broke nothing else |
| Release | Decide it may go to users |
| Deploy | Put it on the servers |
| Operate | Keep it running |
| Monitor | Watch errors, speed and usage. Feeds the next plan |
| Batch size | How many changes travel together. Smaller is safer |
| Value stream map | Working time vs waiting time, stage by stage |
git log --reverse --grep=WORD | When the work on a change started |