From 7f21ef5a0079c73701f45e3270b578346212f999 Mon Sep 17 00:00:00 2001 From: Eddy Ashton Date: Tue, 23 Jul 2024 14:10:02 +0100 Subject: [PATCH] Login to `ccfmsrc` ACR resource with managed identity rather than token (#6387) --- .azure-pipelines-templates/deploy_aci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines-templates/deploy_aci.yml b/.azure-pipelines-templates/deploy_aci.yml index 8193053e33d9..d4dc36b75f83 100644 --- a/.azure-pipelines-templates/deploy_aci.yml +++ b/.azure-pipelines-templates/deploy_aci.yml @@ -41,15 +41,14 @@ jobs: - script: | set -ex - docker login -u $ACR_TOKEN_NAME -p $ACR_CI_PUSH_TOKEN_PASSWORD $ACR_REGISTRY + az acr login --name $ACR_REGISTRY_RESOURCE_NAME docker pull $BASE_IMAGE docker build -f docker/ccf_ci_built . --build-arg="base=$BASE_IMAGE" -t $ACR_REGISTRY/ccf/ci:pr-`git rev-parse HEAD` docker push $ACR_REGISTRY/ccf/ci:pr-`git rev-parse HEAD` name: build_ci_image displayName: "Build CI SNP container" env: - ACR_TOKEN_NAME: ci-push-token - ACR_CI_PUSH_TOKEN_PASSWORD: $(ACR_CI_PUSH_TOKEN_PASSWORD) + ACR_REGISTRY_RESOURCE_NAME: ccfmsrc ACR_REGISTRY: ccfmsrc.azurecr.io BASE_IMAGE: ghcr.io/microsoft/ccf/ci/default:build-26-06-2024