Commit 440d556f authored by Kent 'picat' Gruber's avatar Kent 'picat' Gruber
Browse files

Handle successful/canceled/blocked deployments in CLI output

Otherwise the spinner would just end, which felt a bit awkward.

I wanted to see a  "✓" to know that everything was ok, and a "!" (maybe something else?) if something went wrong.
Showing with 10 additions and 2 deletions
+10 -2
......@@ -321,7 +321,15 @@ UPDATE:
} else {
break UPDATE
}
case structs.DeploymentStatusSuccessful, structs.DeploymentStatusCancelled, structs.DeploymentStatusDescriptionBlocked:
case structs.DeploymentStatusSuccessful:
endSpinner = glint.Layout(
glint.Text(fmt.Sprintf("✓ Deployment %q %s", limit(deployID, length), status)),
).Row().MarginLeft(2)
break UPDATE
case structs.DeploymentStatusCancelled, structs.DeploymentStatusDescriptionBlocked:
endSpinner = glint.Layout(
glint.Text(fmt.Sprintf("! Deployment %q %s", limit(deployID, length), status)),
).Row().MarginLeft(2)
break UPDATE
default:
q.WaitIndex = meta.LastIndex
......
......@@ -153,7 +153,7 @@ $ nomad job run -check-index 6 example.nomad
2021-06-09T16:57:30-07:00: Evaluation status changed: "pending" -> "complete"
==> 2021-06-09T16:57:30-07:00: Evaluation "5ef16dff" finished with status "complete"
==> 2021-06-09T16:57:30-07:00: Monitoring deployment "62eb607c"
Deployment "62eb607c" successful
Deployment "62eb607c" successful
2021-06-09T16:57:30-07:00
ID = 62eb607c
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment