Spacelift Staged Batch Rollout
Spacelift Staged Batch Rollout
Rolling the same change out to every Spacelift stack at once is risky — a bad commit can take down every environment simultaneously. This Flow turns a push to your main branch into a staged rollout across your stacks, with humans kept in the loop on Slack at every gate.
On the happy path, a commit to the tracked branch opens a Slack thread and rolls out through three stages — dev, then staging, then prod. Each stage deploys to its own set of stacks, and between stages the Flow asks for approval in Slack before promoting to the next one.
If a stage fails, the Flow asks in Slack whether to retry — approving re-runs the whole stage, rejecting halts the rollout. Any other error is reported to Slack.
Implementation notes for adapting it: each stage deploys with a Spacelift "Trigger Run Batch" block (a stage succeeds only if no run in the batch fails) wrapped in a Concurrency Group so only one rollout runs per environment at a time, and the Slack approve/retry logic is reused across all the gates via a single Utilities subroutine block. The stages, their stacks, and the Slack channel are hardcoded as a starting point for you to tweak.
Stage 1
Approval Gate
Stage 2
Approval Gate
Stage 3