Fix Packer: pass directory (not single file) + -only flag

Packer needs the directory to find variables.pkr.hcl. Use -only to
select the right source (windows-x64 or windows-arm64).

[build images]
This commit is contained in:
Dylan Conway
2026-02-12 21:50:23 -08:00
parent cd3734895d
commit f5fe6da89a

View File

@@ -1209,6 +1209,8 @@ async function buildWindowsImageWithPacker({ os, arch, release, command, ci, age
const packerArgs = [
packerBin,
"build",
"-only",
`azure-arm.${templateName}`,
"-var",
`client_id=${clientId}`,
"-var",
@@ -1231,7 +1233,7 @@ async function buildWindowsImageWithPacker({ os, arch, release, command, ci, age
`bootstrap_script=${bootstrapPath}`,
"-var",
`agent_script=${agentPath}`,
templateFile,
templateDir,
];
await spawnSafe(packerArgs, {