Skip to content

Commit 0549f55

Browse files
committed
fix(cli): reject from-bundle deploys that need instance base images
1 parent a6bd65a commit 0549f55

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎docs/self-hosting/overview.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ DEPLOY_BASE_IMAGES="node-26=registry.example.com/node-fips:26@sha256:<64-charact
110110

111111
Entries are comma-separated `runtime=image@sha256:<digest>`. The runtimes are `node-22`, `node-24`, `node-26` and `bun`, and every image must be pinned by digest. An invalid value prevents the webapp from starting. Projects with `runtime: "node"` in their config resolve to the current default Node runtime (`node-24` today), so set that key for them. With the Helm chart, set the variables through `webapp.extraEnvVars`.
112112

113-
Runtimes with an entry build on that image; the others keep the published images. Deploys from CLI versions that cannot apply the images are rejected with an error asking to upgrade, and so are `--native-build` and `--local-bundle` deploys. This is a self-hosting setting and does not apply to Trigger.dev Cloud.
113+
Runtimes with an entry build on that image; the others keep the published images. Deploys from CLI versions that cannot apply the images are rejected with an error asking to upgrade, and so are `--native-build`, `--local-bundle` and `--from-bundle` deploys. This is a self-hosting setting and does not apply to Trigger.dev Cloud.
114114

115115
You own a custom base image. It must provide:
116116

‎packages/cli-v3/src/commands/deploy.ts‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,12 +2308,16 @@ async function handleFromBundleDeploy({
23082308
existingDeploymentId
23092309
);
23102310

2311-
await applyServerBaseImages({
2312-
baseImages: deployment.baseImages,
2313-
outputPath: bundlePath,
2314-
buildManifest: bundleManifest,
2315-
options,
2316-
});
2311+
if (deployment.baseImages) {
2312+
const message =
2313+
"This instance requires custom deploy base images, which --from-bundle deploys cannot apply. Deploy without --from-bundle.";
2314+
2315+
await projectClient.client.failDeployment(deployment.id, {
2316+
error: { name: "BuildError", message },
2317+
});
2318+
2319+
throw new Error(message);
2320+
}
23172321

23182322
// Fail fast if we know local builds will fail
23192323
const buildxResult = await x("docker", ["buildx", "version"]);

0 commit comments

Comments
 (0)