Skip to content

Commit 3f7fca0

Browse files
add login (devcontainers#391)
1 parent 56f10e7 commit 3f7fca0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build/src/push.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ async function push(repo, release, updateLatest, registry, registryPath, stubReg
5757
stagingFolder = await configUtils.getStagingFolder(release);
5858
await configUtils.loadConfig(stagingFolder);
5959

60+
const registryName = registry.replace(/\.azurecr\.io.*/, '');
61+
const spawnOpts = { stdio: 'inherit', shell: true };
62+
await asyncUtils.spawn('az', [
63+
'acr',
64+
'login',
65+
'--name',
66+
registryName
67+
], spawnOpts);
68+
6069
console.log(`**** Pushing ${currentJob['id']}: ${currentJob['variant']} ${release} ****`);
6170
await pushImage(
6271
currentJob['id'], currentJob['variant'] || null, repo, release, updateLatest, registry, registryPath, stubRegistry, stubRegistryPath, prepOnly, pushImages, replaceImages, secondaryRegistryPath);

0 commit comments

Comments
 (0)