Laptop to Production

The DevOps lifecycle

Plan, code, build, test, release, deploy, operate, monitor.

Time
25 minutes
Level
Beginner
Read first
Nothing — you can start here

Part 1: The problem

QuickCart, release night

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

StageWhat happensIn QuickCart’s app world
PlanDecide what to build nextPicking tickets for the sprint
CodeWrite the change, and have someone review itA pull request
BuildTurn the code into something that can runArchiving the app
TestCheck it works and hasn’t broken anything elseUnit tests, then TestFlight
ReleaseDecide it’s allowed to go to usersSubmitting for review
DeployPut it on the serversThe store making the build available
OperateKeep it running: capacity, fixes, incidentsAnswering support tickets
MonitorWatch what it does: errors, speed, usageCrash 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:

StageWorking on itWaiting
Code2 days19 days, for the other 39 changes
Build1 day of merge conflicts
Test1 hour of testing this change7 days, for everything else to be tested
Release4 days, for the monthly window
Deploy2 hours
Totalabout 3 daysabout 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 batchesWith small batches
A bug could be in any of forty changesA bug is almost certainly in the one change that just shipped
Feedback arrives weeks after the code was writtenFeedback arrives while the author still remembers the code
Release day is scary, so it happens rarely, so batches growReleases are boring, so they happen often, so batches stay small
Merging three weeks of work causes conflictsMerging 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.

Key point: A change only helps anyone once it reaches users. In most teams it spends most of its trip waiting, not being worked on, and smaller batches shrink the wait.

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.

The team works in
The DevOps loop: plan, code, build, test, release, deploy, operate, monitor, and back to plan.Plandecide what to buildCodewrite itBuildpackage itTestcheck it worksReleaseapprove it to goDeployput it on serversOperatekeep it runningMonitorwatch how it does0 hourssince the change was planned1 change in this release
ReadyChoose Send a change round to follow one change through the loop. Then switch to Big batches and send another.

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.

  1. 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 photo or checkout.

  2. 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:

    Terminal
    git log --reverse --format="%h  %ad  %s" --date=short -i --grep="photo"
    PartWhat 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 see
    19f7ca8  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-photos

    Yours 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.

  3. 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.

  4. 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.

    StageWorking on itWaitingWaiting for what?
    Code, including review
    Build
    Test
    Release
    Deploy
    Total

    Add up each column.

    You should see

    Two totals. For most teams, Waiting is several times bigger than Working on it.

  5. 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 forThe usual fixWhere it’s taught
    Other changes, to release togetherRelease each change on its ownThis module
    Someone to test it by handAutomated tests on every changeContinuous integration
    An approval meeting or release windowAutomated checks as the approval, and safer ways to releaseWays to release
    Someone to run the deployA pipeline that deploysContinuous delivery
    A feature being finishedShip it switched off, behind a flagFeature flags

    Write one sentence: “Our biggest wait is ___, and we could shrink it by ___.”

  6. Clean-up step: Clean up

    Nothing to delete. git log only 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

On one card
StageIn one line
PlanDecide what to build next, using what monitoring showed
CodeWrite it, and have it reviewed
BuildTurn code into something that runs
TestCheck it works and broke nothing else
ReleaseDecide it may go to users
DeployPut it on the servers
OperateKeep it running
MonitorWatch errors, speed and usage. Feeds the next plan
Batch sizeHow many changes travel together. Smaller is safer
Value stream mapWorking time vs waiting time, stage by stage
git log --reverse --grep=WORDWhen the work on a change started

Finished the build and the quiz? Mark it done to fill in its stop on the route map.