Skip to content

feat(deploy-fly): implement real CLI-backed flyctl integration#228

Open
emil07770 wants to merge 1 commit into
profullstack:masterfrom
emil07770:feat/deploy-fly-cli-integration-v2
Open

feat(deploy-fly): implement real CLI-backed flyctl integration#228
emil07770 wants to merge 1 commit into
profullstack:masterfrom
emil07770:feat/deploy-fly-cli-integration-v2

Conversation

@emil07770
Copy link
Copy Markdown
Contributor

Summary

  • Replace stub build() and ship() with real exec() calls to flyctl
  • build(): runs flyctl deploy --build-only --app <app> with FLY_API_TOKEN env var
  • ship(): runs flyctl deploy --remote-only --strategy=<strategy> --app <app> with token; supports --region flags and custom --dockerfile
  • Reads token via ctx.secret('FLY_API_TOKEN'), throws descriptive error if missing
  • Short-circuits on ctx.dryRun in ship()
  • Parses deployed URL from flyctl stdout (https://*.fly.dev) and deployment version (v<n> deployed)
  • Passes cwd: ctx.projectDir and env: { FLY_API_TOKEN } to exec for proper isolation

Test plan

  • Set FLY_API_TOKEN secret: sh1pt secret set FLY_API_TOKEN <token>
  • Dry-run: sh1pt ship deploy-fly --dry-run should return { id: 'dry-run' } without calling flyctl
  • Build-only: sh1pt build deploy-fly should invoke flyctl deploy --build-only
  • Full deploy: sh1pt ship deploy-fly should invoke flyctl deploy --remote-only --strategy=rolling and return { id, url }
  • Missing token: should throw with helpful message pointing to sh1pt secret set FLY_API_TOKEN

🤖 Generated with Claude Code

Replace stub with actual exec() calls to flyctl for both build and ship.
- build(): runs `flyctl deploy --build-only` with FLY_API_TOKEN env
- ship(): runs `flyctl deploy --remote-only --strategy=<strategy>` with token
- Reads token via ctx.secret('FLY_API_TOKEN'), throws if missing
- Short-circuits on ctx.dryRun in ship()
- Parses deployed URL from flyctl stdout (https://*.fly.dev)
- Passes cwd and env to exec for proper isolation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ralyodio
Copy link
Copy Markdown
Contributor

Heads up — the failing vu1nz security scan check needs a workflow fix that's on master (commit b3290b8). I tried to update this branch automatically but hit merge conflicts. Could you rebase/merge master locally, resolve conflicts, and force-push? Once that's in, the CI check will go green. Thanks!

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