Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/spicy-turkeys-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trigger.dev": minor
---

feat: exit if docker buildx can't be found for self-hosted builds
2 changes: 1 addition & 1 deletion packages/cli-v3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"std-env": "^3.7.0",
"terminal-link": "^3.0.0",
"tiny-invariant": "^1.2.0",
"tinyexec": "^0.2.0",
"tinyexec": "^0.3.1",
"ws": "^8.18.0",
"xdg-app-paths": "^8.3.0",
"zod": "3.22.3",
Expand Down
12 changes: 12 additions & 0 deletions packages/cli-v3/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { spinner } from "../utilities/windows.js";
import { login } from "./login.js";
import { updateTriggerPackages } from "./update.js";
import { resolveAlwaysExternal } from "../build/externals.js";
import { x } from "tinyexec";

const DeployCommandOptions = CommonCommandOptions.extend({
dryRun: z.boolean().default(false),
Expand Down Expand Up @@ -265,6 +266,17 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
);
}

if (options.selfHosted) {
const result = await x("docker", ["buildx", "version"]);

if (result.exitCode !== 0) {
logger.debug(`"docker buildx version" failed (${result.exitCode}):`, result);
throw new Error(
"Failed to find docker buildx. Please install it: https://github.com/docker/buildx#installing."
);
}
}

if (
buildManifest.deploy.sync &&
buildManifest.deploy.sync.env &&
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.