Skip to content

feat: add deploy command and deploy-after-upload support#112

Merged
mobileoverlord merged 1 commit intomainfrom
add-deploy-commands
Mar 25, 2026
Merged

feat: add deploy command and deploy-after-upload support#112
mobileoverlord merged 1 commit intomainfrom
add-deploy-commands

Conversation

@lee-reinhardt
Copy link
Member

Summary

Adds avocado connect deploy for deploying runtimes to cohorts, and --deploy-* flags on avocado connect upload for one-command upload+deploy workflows.

New: avocado connect deploy

Standalone command to create a deployment targeting a cohort with a runtime.

  • Interactive runtime and cohort pickers when flags aren't provided (auto-selects when only one option exists)
  • --runtime <id> and --cohort <id> for non-interactive use (validated against the project)
  • --name <name> for deployment name (auto-generated from runtime version + timestamp if omitted)
  • --description <text> for optional description
  • --tag / -t (repeatable) to filter deployment to devices with matching tags
  • --activate to skip draft and immediately activate the deployment
  • Deployment ID is always printed before activation is attempted, so it's never lost if activation fails
# Interactive
avocado connect deploy

# Non-interactive
avocado connect deploy --runtime <id> --cohort <id> --activate

# With tag filtering
avocado connect deploy --runtime <id> --cohort <id> -t production -t us-west --activate

New: upload --deploy-* flags

Upload and deploy in one command. After a successful upload, automatically creates a deployment using the freshly uploaded runtime.

  • --deploy-cohort <id> — required to trigger deploy-after-upload
  • --deploy-name <name> — optional deployment name
  • --deploy-tag <tag> — optional tag filter (repeatable)
  • --deploy-activate — activate immediately

Using --deploy-name, --deploy-tag, or --deploy-activate without --deploy-cohort raises an explicit error.

avocado connect upload dev --deploy-cohort <id> --deploy-activate

Files changed

  • New: src/commands/connect/deploy.rs — deploy command, deploy-after-upload helper, flag validation with tests
  • Modified: src/commands/connect/client.rs — deployment types and API methods (create, activate, list runtimes)
  • Modified: src/commands/connect/upload.rs — deploy-after-upload integration
  • Modified: src/commands/connect/mod.rs — add deploy module
  • Modified: src/main.rs — CLI definitions and wiring

@mobileoverlord mobileoverlord merged commit a211c31 into main Mar 25, 2026
3 of 4 checks passed
@mobileoverlord mobileoverlord deleted the add-deploy-commands branch March 25, 2026 02:31
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.

2 participants