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/dry-mirrors-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---

Build logs no longer include docker's registry login output, most notably the credential-storage warning on failed builds.
10 changes: 8 additions & 2 deletions packages/cli-v3/src/deploy/buildImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,19 +514,25 @@ async function localBuildImage(options: SelfHostedBuildImageOptions): Promise<Bu
loginProcess.process?.stdin?.write(credentials.password);
loginProcess.process?.stdin?.end();

// Login output (incl. docker's credential-storage warning) stays out of the build
// logs; it is fully visible at debug level and returned when the login itself fails.
const loginLogs: string[] = [];

for await (const line of loginProcess) {
errors.push(line);
loginLogs.push(line);
logger.debug(line);
}

if (loginProcess.exitCode !== 0) {
return {
ok: false as const,
error: `Failed to login to registry: ${cloudRegistryHost}`,
logs: extractLogs(errors),
logs: extractLogs(loginLogs),
};
}

// `errors` is the shared build log buffer; keep a marker there so failure logs show auth ran
errors.push(`Logged in to ${cloudRegistryHost}`);
options.onLog?.(`Successfully logged in to the remote registry`);
}

Expand Down
Loading