Skip to content

Exit non-zero on failed deploys, add deploy --watch#19

Merged
stevethomas merged 3 commits intomainfrom
steve/deploy-watch
Apr 27, 2026
Merged

Exit non-zero on failed deploys, add deploy --watch#19
stevethomas merged 3 commits intomainfrom
steve/deploy-watch

Conversation

@stevethomas
Copy link
Copy Markdown
Member

Summary

  • deploy:status now exits 1 when any displayed deployment ended in Failed or Stopped, so CI scripts can fail loudly on a bad deploy.
  • deploy <env> gains a --watch (-w) flag — once the deploy steps finish, it chains straight into deploy:status --watch and propagates its exit code.
  • SteppedCommand::handle() switched to int return so subclasses can chain a non-zero exit code through.

Test plan

  • yolo deploy:status <env> against a healthy env exits 0
  • yolo deploy:status <env> against an env whose latest CodeDeploy is Failed exits 1
  • yolo deploy <env> --watch runs deploy as normal then drops into the polling status table, exits 0 when all green
  • yolo deploy <env> --watch exits 1 if any group ends Failed

🤖 Generated with Claude Code

stevethomas and others added 3 commits April 27, 2026 14:55
deploy:status now returns exit code 1 if any displayed deployment ended
in Failed or Stopped, so CI scripts can fail correctly.

deploy gains a --watch (-w) option that chains straight into
deploy:status --watch once the deploy steps complete, propagating its
exit code.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
BuildCommand, StageCommand and SyncCommand still declared
handle(): void, breaking covariance after SteppedCommand::handle()
moved to int. Bumped each to int and propagated parent's return.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Symfony exposes named constants for the canonical exit codes; using
them reads better than bare 0/1 at the return sites.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stevethomas stevethomas merged commit 1a030b0 into main Apr 27, 2026
4 checks passed
@stevethomas stevethomas deleted the steve/deploy-watch branch April 27, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant