Blog · Studio tools

One way to deploy: building shipper.

Every ideaSquared deploy now goes through one tool. This is how shipper went from an empty repo to that in eleven days, and what we had to fix on the way.

Why it exists

The idea comes from Monzo’s Shipper: one way to deploy, with the safety rules built into the tool rather than written down. A studio that runs on evenings can’t rely on someone remembering a checklist. The tool has to remember it.

shipper has three parts:

  • a ship.yaml in each product repo, saying what it deploys and how to check it;
  • one shared GitHub Actions workflow that gates, deploys to Cloudflare Workers, runs a health check, rolls back on failure and posts a report to Discord;
  • the ship command-line tool, for people.

Day one: the manifest, the workflow and the CLI

The first day, 13 November, produced the manifest, the reusable workflow, the Discord report through the ideaSquared bot and the first version of ship. This site’s own ship.yaml shows the shape, trimmed:

product: ideasquared-website
discord: ideasquared
checks: [Verify, Lighthouse]
environments:
  staging:
    wranglerEnv: staging
  production:
    requires: [staging]
components:
  site:
    type: cloudflare-worker
    health:
      production:
        url: https://ideasquared.co.uk/
        expect: A little spark

Most of the rest of that day was fixes, and most of those fixes were safety rules we hadn’t thought of until a first real product moved over:

  • roll back when the health URL is unknown, and time out a health check that hangs;
  • never deploy a commit older than what is live;
  • never let a failed GitHub comparison stop a deploy;
  • make people type the product name before a production deploy or rollback.

By the end of the day shipper recorded a GitHub Deployment for each commit it shipped, could deploy a given commit, and had ship rollback.

Week two: the commands you need on a bad day

On 20 November we added the commands for when something is wrong, not only for when things go well:

  • ship doctor checks a product’s deploy setup, so a mistake shows up as a failed check instead of a failed deploy;
  • ship freeze blocks deploys with a reason everyone sees, and ship unfreeze lifts it;
  • ship logs streams a deployed environment’s live logs;
  • smoke checks run after the health check, and ship diff lists database migrations waiting to ship.

Review of that work found three things worth saying out loud. ship doctor’s error messages could include secrets, so we took them out. A broken freeze setting could block a rollback, which is the one deploy you must never block; now a rollback warns and carries on. And two freeze changes made at once could lose one. We narrowed that race, but GitHub’s variables can’t close it fully, so it is still there, smaller.

Saying what to do next

On 21 November we went through every message shipper prints when it refuses to deploy. A blocked deploy now says why it was blocked and what to do next. It no longer claims a commit is fine or broken when a check is still running or was cancelled. And ship status warns before you deploy if a check on the latest commit would block it.

The same day, releases of shipper itself changed: the v1 tag that every product uses now moves only through an approved release run, and products can pin the workflow to an exact commit.

Making it a proper project

On 22 November shipper went through the same engineering standards as every other ideaSquared repo: Node 24, ship --version, Prettier, ESLint, Conventional Commits, a changelog and tagged releases. CI now installs the packed CLI and runs it, so a broken install is caught before anyone else meets it. The last feature that day was a small one we use constantly: a deploy now queues until its checks pass, instead of failing because CI was still running.

By 24 November shipper had 98 commits.

What we learned

  • A safety check must never block the fix. The freeze bug and the GitHub comparison bug were the same mistake: a check meant to protect production could stop us repairing it.
  • The refusal message is part of the feature. A deploy that says “blocked” and nothing else moves the work to whoever reads it.
  • Test the thing people install. Running the packed CLI in CI catches problems that unit tests can’t.

All posts