From c99f4ec2997974f61126c168be1c94607d8b240e Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Tue, 2 Apr 2024 13:17:55 -0700 Subject: [PATCH] Use authenticatedContainerRegistries config for 1es template --- eng/pipelines/publish.yaml | 2 ++ eng/pipelines/templates/1es-redirect.yml | 4 ++++ eng/pipelines/templates/build-and-push-docker.yaml | 6 ------ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/publish.yaml b/eng/pipelines/publish.yaml index fd8c4be832..b8b009b15b 100644 --- a/eng/pipelines/publish.yaml +++ b/eng/pipelines/publish.yaml @@ -10,6 +10,8 @@ trigger: extends: template: /eng/pipelines/templates/1es-redirect.yml parameters: + authenticatedContainerRegistries: + - serviceConnection: azsdkengsys stages: - stage: npm pool: diff --git a/eng/pipelines/templates/1es-redirect.yml b/eng/pipelines/templates/1es-redirect.yml index beb2f1c7c6..9e30789be5 100644 --- a/eng/pipelines/templates/1es-redirect.yml +++ b/eng/pipelines/templates/1es-redirect.yml @@ -15,6 +15,9 @@ parameters: - name: Use1ESOfficial type: boolean default: true + - name: authenticatedContainerRegistries + type: object + default: [] extends: ${{ if and(parameters.Use1ESOfficial, eq(variables['System.TeamProject'], 'internal')) }}: @@ -24,6 +27,7 @@ extends: parameters: settings: skipBuildTagsForGitHubPullRequests: true + authenticatedContainerRegistries: ${{ parameters.authenticatedContainerRegistries }} sdl: git: longpaths: true diff --git a/eng/pipelines/templates/build-and-push-docker.yaml b/eng/pipelines/templates/build-and-push-docker.yaml index 3e7934b9ff..8aff7b8d25 100644 --- a/eng/pipelines/templates/build-and-push-docker.yaml +++ b/eng/pipelines/templates/build-and-push-docker.yaml @@ -17,12 +17,6 @@ jobs: inputs: dockerVersion: "17.09.0-ce" - - task: Docker@2 - displayName: Login to ACR - inputs: - command: login - containerRegistry: azsdkengsys - - script: | docker build -t ${{ parameters.image }} . displayName: Build image