You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(app): add --no-promote for promotionless deploys
Add a `--no-promote` flag to `prisma-cli app deploy` that builds a new
deployment without flipping the live pointer. The previous deployment
keeps serving live; the new one is reachable only at its own candidate
URL until a later `app promote <deployment-id>` makes it live.
This is the CI build-then-verify path: build the candidate, health-check
its URL, then promote. Because a promotionless deploy never replaces the
live deployment, it bypasses the production-confirmation gate — so
`app deploy --no-promote` on the production branch works without `--prod`.
Wiring:
- ComputeClient.deploy already supports `skipPromote`; the provider now
forwards it and maps the not-promoted return (candidate URL, live
pointer stays on the previous deployment, `promoted: false`).
- Controller threads `noPromote`, skips the gate when set, surfaces
`promoted` + `deployment.live`, and leads nextSteps with `app promote`.
- Human output renders a built-not-live headline with a promote hint;
`--json` carries `promoted` and the candidate `deployment.{url,live}`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@@ -1053,7 +1053,7 @@ same reasons they are excluded today.
1053
1053
- the `[app]` argument selects an `apps` target by key:
1054
1054
- without an `[app]` argument, a command run from inside a target's `root` selects that target, so `cd apps/api && prisma-cli app deploy` deploys `api`; the deepest matching root wins and an ambiguous tie selects nothing
1055
1055
- with multiple `apps` entries, no `[app]` argument, and no target inferred from the invocation directory, deploy deploys every target sequentially in declaration order — the config declares the system, and a bare `prisma-cli app deploy` ships it
1056
-
- deploying all targets rejects per-app inputs (`--app`, `--framework`, `--entry`, `--http-port`, `--region`, `--env`, `PRISMA_APP_ID`) with a usage error; project- and branch-level flags (`--project`, `--create-project`, `--branch`, `--db`, `--no-db`, `--prod`, `--yes`) apply to the whole run, with `--create-project` creating and binding the Project once before the first target
1056
+
- deploying all targets rejects per-app inputs (`--app`, `--framework`, `--entry`, `--http-port`, `--region`, `--env`, `PRISMA_APP_ID`) with a usage error; project- and branch-level flags (`--project`, `--create-project`, `--branch`, `--db`, `--no-db`, `--prod`, `--no-promote`, `--yes`) apply to the whole run, with `--create-project` creating and binding the Project once before the first target
1057
1057
- a deploy-all run stops at the first failure and reports the targets already live; `--json` output aggregates one full deploy result per target
1058
1058
-`app build` and `app run` still require a target in multi-app configs and fail with `COMPUTE_CONFIG_TARGET_REQUIRED` (a dev server cannot run N apps at once; build keeps the same shape)
1059
1059
- an `[app]` argument that matches no target fails with `COMPUTE_CONFIG_TARGET_UNKNOWN`
@@ -1120,6 +1120,8 @@ Behavior:
1120
1120
- resolves or creates app context inside the resolved branch from `--app`, `PRISMA_APP_ID`, `package.json#name`, or current directory name
1121
1121
- auto-promotes the first production deploy for an App without `--prod`
1122
1122
- requires `--prod` for subsequent deploys to a production Branch; `--yes` only skips the confirmation prompt when `--prod` is also present
1123
+
- supports `--no-promote` to build a new deployment without promoting it to live: the previous deployment keeps serving, and the new deployment is reachable only at its own candidate URL until a later `app promote <deployment-id>` makes it live
1124
+
-`--no-promote` never replaces the live deployment, so it bypasses the production gate: `app deploy --no-promote` on a production Branch builds a candidate without `--prod` and without confirmation. It is the CI build-then-verify path — build the candidate, health-check its URL, then `app promote`
1123
1125
- does not prompt when there is no real choice; zero matching apps creates the inferred app
1124
1126
- writes `.prisma/local.json` after Project binding succeeds and before build/deploy starts, so retries after a failed deploy do not repeat setup
1125
1127
- before asking `Customize build settings? (y/N)`, previews the detected framework and runtime so the user can see the defaults they are accepting or changing
@@ -1135,6 +1137,7 @@ Behavior:
1135
1137
- after setup, deploy prints `Deploying to <Project> / <Branch> / <App>`; later deploys print a compact target header such as `Deploying ./j1 to j1 / main / j1`
1136
1138
- deploy progress uses short stage copy (`Building locally...`, `Built <size>`, `Uploading...`, `Uploaded`, `Deploying...`, `Deployed`) and never prints `Status: running` or `Deployment is running at ...`
1137
1139
- success human output prints `Live in <duration>`, the URL on its own line, and `Logs prisma-cli app logs`
1140
+
- with `--no-promote`, success human output instead prints `Built <deployment-id> in <duration> (not promoted)`, the candidate URL on its own line, a note that the live deployment is unchanged, and a `Promote prisma-cli app promote <deployment-id>` next step
1138
1141
- accepts repeated `--env NAME=VALUE` flags and dotenv file paths such as `--env .env`
1139
1142
- supports `--db` to create a new empty Prisma Postgres database and write `DATABASE_URL` and `DIRECT_URL` through the existing `project env` storage; the CLI never runs schema or migration commands — applying the schema stays with the user's own tooling
1140
1143
-`--db` is the opinionated single-database path: it creates **one** branch database and exposes `DATABASE_URL`/`DIRECT_URL` as branch-scoped env vars, so every app on the branch shares it. In a multi-app deploy-all run the database is created once (on the first target) and reused by the rest; the run never creates a database per app. Per-app or per-service database topologies are explicit-configuration territory — set each app's database env vars yourself rather than relying on `--db` to infer app-to-database ownership
0 commit comments