nomad deployment status: Gate CI on a Rollout
nomad deployment status shows whether a jobs rolling deployment is running, successful, or failed, with per-group healthy and desired counts.
For a deploy gate this is cleaner than job status: -monitor blocks until the rollout succeeds or fails and exits with a matching code.
What it does
nomad deployment status reports the state of a deployment (running, successful, failed, paused) and, per task group, the desired, placed, healthy, and unhealthy allocation counts plus canary and auto-revert info. -monitor streams until the deployment reaches a terminal state.
Common usage
# get the latest deployment id for a job, then watch it
nomad job status web
nomad deployment status <deployment-id>
nomad deployment status -monitor <deployment-id>Options
| Flag | What it does |
|---|---|
| -monitor | Stream status until the deployment finishes |
| -verbose | Full IDs and extra per-allocation detail |
| -json | Emit the deployment object as JSON |
| -t <template> | Format output with a Go template |
In CI
Run nomad deployment status -monitor as the deploy gate: it exits 0 on a successful rollout and non-zero on failure, so the pipeline step passes or fails on real health, not just submission. Pair it with auto_revert in the jobspec so a failed canary rolls back automatically.
Common errors in CI
A deployment that ends "failed" with "Failed due to unhealthy allocations" means tasks did not pass their health checks in time; inspect the allocs with nomad alloc status. "No deployment(s) with id ... found" usually means a batch or system job, which has no deployment object. A deployment stuck "running" past your timeout often means health checks never go healthy.