Skip to content

Commit

Permalink
Use ACR service connection when pushing containers (#1484)
Browse files Browse the repository at this point in the history
* Update build-and-push-containers.yml

* Update build-and-push-containers.yml

* Update build-and-push-containers.yml

* Update build-and-push-containers.yml

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* add comment

* Update azure-pipelines-ci.yml

* Update docker-compose.yml

* revert compose

* Update .pipelines/templates/build-and-push-containers.yml

Co-authored-by: Omri Mendels <[email protected]>

---------

Co-authored-by: Omri Mendels <[email protected]>
  • Loading branch information
SharonHart and omri374 authored Nov 15, 2024
1 parent fde30dd commit a0a5f89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .pipelines/templates/build-and-push-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ steps:
- task: DockerCompose@0
displayName: Push Presidio Images to ACR
inputs:
action: 'Push services'
action: Push services
dockerComposeFile: ${{ parameters.DOCKER_COMPOSE_FILE }}
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'presidio-acr'
containerregistrytype: Azure Container Registry
# Passing as an object since by default a double forward-slash is added to the end of the registry name (https://presidio.azurecr.io//oauth2/exchange)
azureContainerRegistry: '{"loginServer":"$(ACR_REGISTRY_NAME).azurecr.io"}'
azureSubscriptionEndpoint: ${{ parameters.AZURE_SUBSCRIPTION }}
projectName: 'microsoft_presidio'
dockerComposeFileArgs: |
REGISTRY_NAME=${{ parameters.REGISTRY_NAME }}
Expand Down
5 changes: 3 additions & 2 deletions azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ stages:
projectName: 'microsoft_presidio'
dockerComposeCommand: pull
dockerComposeFile: docker-compose.yml
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'presidio-acr'
containerregistrytype: Azure Container Registry
azureSubscriptionEndpoint: $(ACR_AZURE_SUBSCRIPTION)
azureContainerRegistry: '$(ACR_REGISTRY_NAME).azurecr.io'
dockerComposeFileArgs: |
REGISTRY_NAME=$(REGISTRY_NAME)
TAG=$(TAG)
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stages:
pool:
vmImage: 'ubuntu-latest'
variables:
REGISTRY_NAME: '$(ACR_REGISTRY_NAME).azurecr.io/'
REGISTRY_NAME: '$(ACR_REGISTRY_NAME).azurecr.io'
TAG: ':$(Build.BuildId)'
steps:
- task: DockerCompose@0
Expand Down

0 comments on commit a0a5f89

Please sign in to comment.