Skip to content

Commit 6fd1376

Browse files
committed
src: disable native multi-arch builds
1 parent aa05aa4 commit 6fd1376

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/setup_builder.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,11 @@ const buildkitdTimeoutMs = 30000;
225225
export async function startAndConfigureBuildkitd(parallelism: number, platforms?: string[]): Promise<string> {
226226
// For multi-platform builds, we need to use the tailscale IP
227227
let buildkitdAddr = BUILDKIT_DAEMON_ADDR;
228+
const nativeMultiPlatformBuildsEnabled = false && (platforms?.length ?? 0 > 1);
228229

229230
// If we are doing a multi-platform build, we need to join the tailnet and bind buildkitd to the tailscale IP.
230231
// We do this so that the remote VM can join the same buildkitd cluster as a worker.
231-
if (platforms && platforms.length > 1) {
232+
if (nativeMultiPlatformBuildsEnabled) {
232233
await joinTailnet();
233234
const tailscaleIP = await getTailscaleIP();
234235
if (!tailscaleIP) {
@@ -241,11 +242,6 @@ export async function startAndConfigureBuildkitd(parallelism: number, platforms?
241242
const addr = await startBuildkitd(parallelism, buildkitdAddr);
242243
core.debug(`buildkitd daemon started at addr ${addr}`);
243244

244-
if (platforms && platforms.length > 1) {
245-
// TODO(adityamaru): Queue docker job for multi-platform build with a well known tailscale hostname.
246-
// TODO(adityamaru): Wait until the VM joins the tailnet.
247-
}
248-
249245
// Check that buildkit instance is ready by querying workers for up to 30s
250246
const startTimeBuildkitReady = Date.now();
251247
const timeoutBuildkitReady = buildkitdTimeoutMs;
@@ -255,7 +251,7 @@ export async function startAndConfigureBuildkitd(parallelism: number, platforms?
255251
const {stdout} = await execAsync(`sudo buildctl --addr ${addr} debug workers`);
256252
const lines = stdout.trim().split('\n');
257253
// For multi-platform builds, we need at least 2 workers
258-
const requiredWorkers = platforms && platforms.length > 1 ? 2 : 1;
254+
const requiredWorkers = nativeMultiPlatformBuildsEnabled ? 2 : 1;
259255
if (lines.length > requiredWorkers) {
260256
core.info(`Found ${lines.length - 1} workers, required ${requiredWorkers}`);
261257
break;
@@ -270,7 +266,7 @@ export async function startAndConfigureBuildkitd(parallelism: number, platforms?
270266
try {
271267
const {stdout} = await execAsync(`sudo buildctl --addr ${addr} debug workers`);
272268
const lines = stdout.trim().split('\n');
273-
const requiredWorkers = platforms && platforms.length > 1 ? 2 : 1;
269+
const requiredWorkers = nativeMultiPlatformBuildsEnabled ? 2 : 1;
274270
if (lines.length <= requiredWorkers) {
275271
throw new Error(`buildkit workers not ready after ${buildkitdTimeoutMs}ms timeout. Found ${lines.length - 1} workers, required ${requiredWorkers}`);
276272
}

0 commit comments

Comments
 (0)