Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/common directory with azure-sdk-tools for PR 8015 #39536

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions eng/common/pipelines/templates/steps/docker-pull-image.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
parameters:
- name: ContainerRegistryClientId
type: string
- name: ContainerRegistryClientSecret
- name: ServiceConnectionName
type: string
default: azuresdkimages_container-registry
- name: ImageId
type: string
steps:
- pwsh: |
$containerRegistry = ("${{parameters.ImageId}}" -split "\/")[0]
docker login $containerRegistry -u "${{ parameters.ContainerRegistryClientId }}" -p "${{ parameters.ContainerRegistryClientSecret }}"
displayName: Login container registry
- pwsh: |
docker pull '${{ parameters.ImageId}}'
displayName: Pull docker image ${{ parameters.ImageId }}
- task: AzureCLI@2
displayName: Docker Auth and Pull
inputs:
azureSubscription: ${{ parameters.ServiceConnectionName }}
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
# azuresdkimages.azurecr.io/pyrefautocr:latest -> azuresdkimages
$containerRegistryName = ("${{ parameters.ImageId }}" -split "\/")[0].Replace(".azurecr.io", "")

az acr login --name $containerRegistryName
docker pull '${{ parameters.ImageId }}'
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ steps:
- ${{ if ne(parameters.DocValidationImageId, '') }}:
- template: /eng/common/pipelines/templates/steps/docker-pull-image.yml
parameters:
ContainerRegistryClientId: $(azuresdkimages-cr-clientid)
ContainerRegistryClientSecret: $(azuresdkimages-cr-clientsecret)
ImageId: '${{ parameters.DocValidationImageId }}'
- pwsh: |
$packageInfoJson = '${{ convertToJson(parameters.PackageInfoLocations) }}'.Trim('"').Replace("\\", "/")
Expand Down
Loading