Browse the docs

Releases, channels and environments

You merge to main, and every environment that follows main's channel runs the new code. You type no deploy command. Three ideas make this work: the release set, the channel and the environment.

  run on a commit ──publishes──▶ release set rs_9f2c…   (immutable)
                                       ▲
  channel "canary" ──points at─────────┘
       ▲
  environment "prod" ──follows── canary ──▶ deploys what differs

The release set

A release set is what one run published for one commit: the image, the config, the migrations and the deployment declaration of each project the commit affects. Its id starts with rs_ and comes from its content. Nobody can change a release set after it exists, so the same set always deploys the same thing.

The channel

A channel is a name that points at one release set, such as canary or stable. Your putnami.ci.json says which channels a run publishes to:

{
  "rules": [
    { "branches": "main", "publish": ["canary"] }
  ]
}

Each move of a channel gets the next number of that channel: its generation. You move a channel to release, to promote and to roll back. All three are the same operation.

The environment

An environment is a named place where your services run, such as prod. It follows one channel and lists the services it runs:

{
  "envs": {
    "prod": {
      "channel": "canary",
      "workloads": [{ "select": ["apps/web-api", "apps/worker"] }]
    }
  }
}

The platform reads this definition from your repository, at an exact commit, when you run putnami cloud env enable prod. A merge that changes envs does nothing until you run it again. See add an environment.

What happens when you merge

  1. A run tests the exact commit that lands on main. With the merge queue, this run happens before the merge.
  2. The run publishes the projects your change affects as one release set.
  3. When the commit is on main, the channel canary moves to the new release set. Nothing is built again.
  4. Each environment that follows canary compares the release set with what it runs now. It deploys only the services whose image, config, migrations or deployment declaration changed.
  5. For each of these services, the platform runs the migrations, then starts the new revision. The old revision serves until the new one is ready. See how your service runs.

The run does not call the deploy. The channel move starts it. So a promotion or a roll back deploys exactly like a merge.

Only the commit that main points at may move the channel. When two merges land close together, the run of the older commit fails its release, instead of moving canary back to older code.

One deploy per environment and move

Each move opens one deploy per environment that follows the channel. Its id starts with cm_; the CLI calls it a release id. It records which channel moved, its generation, the release set and the commit.

You want to… Run
See what each environment runs putnami cloud env status <env>
Read one deploy, service by service putnami cloud deploy status <cm_id>
See the deploy each service came from putnami cloud env status <env> --provenance

deploy status takes a cm_… id, not a rs_… id.

When a move deploys nothing

A move can deploy nothing. The platform records why:

Outcome Meaning
converged Every service already runs these exact artifacts.
superseded A later move of the same channel already settled. The platform does not walk the environment back to an older set.
no_follower No accepted environment follows this channel. Run putnami cloud env doctor <env>.
not_deployable The release set misses a service the environment declares, for example a project that published no image. No environment of that channel deploys.

A service whose last deploy failed, or is still running, deploys again: its state is unknown.

Promote and roll back

Promoting points a second channel at a release set that already exists, for example canary to stable:

putnami cloud channels set stable --from canary

Rolling back points the channel at an earlier release set:

putnami cloud channels set canary --from rs_<previous>

Both are new moves with a new generation. Each environment that follows the channel compares and deploys, as after a merge. Migrations already applied stay applied. See roll back.

What environments do not do yet

Manual approval before a deploy, progressive rollouts, environment variants, preview environments, and an environment whose services follow different channels are not offered. See feature status.

Next