Skip to content

Commit 1c7fd46

Browse files
committed
fix(cli): TRIGGER_BUILD_SKIP_REWRITE_TIMESTAMP escape hatch
Local self-hosted builds with buildx's docker driver (e.g. orbstack's default builder) fail on push with: exporter option "rewrite-timestamp" conflicts with "unpack" because the docker driver internally enables `unpack=true` on push, which is mutually exclusive with `rewrite-timestamp`. Add an opt-out env var so contributors running `trigger deploy --local-build --push --builder orbstack` against a local registry can proceed without switching to a docker-container driver.
1 parent 5c4e064 commit 1c7fd46

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Add `TRIGGER_BUILD_SKIP_REWRITE_TIMESTAMP=1` escape hatch for local self-hosted builds whose buildx driver doesn't support `rewrite-timestamp` alongside push (e.g. orbstack's default `docker` driver).

packages/cli-v3/src/deploy/buildImage.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,14 @@ function getOutputOptions({
11521152
return outputOptions;
11531153
}
11541154

1155-
const outputOptions: string[] = ["type=image", "oci-mediatypes=true", "rewrite-timestamp=true"];
1155+
// `rewrite-timestamp` is incompatible with the buildx docker driver's
1156+
// implicit `unpack=true` on push (used by e.g. orbstack's default builder).
1157+
// Provide an env-var escape hatch so local-dev deploys can opt out.
1158+
const skipRewriteTimestamp = process.env.TRIGGER_BUILD_SKIP_REWRITE_TIMESTAMP === "1";
1159+
const outputOptions: string[] = ["type=image", "oci-mediatypes=true"];
1160+
if (!skipRewriteTimestamp) {
1161+
outputOptions.push("rewrite-timestamp=true");
1162+
}
11561163

11571164
if (imageTag) {
11581165
outputOptions.push(`name=${imageTag}`);

0 commit comments

Comments
 (0)