-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Login and Pull docker image. (#2179)
Azure/azure-sdk-for-js#18405 Docs is switching the validation using docker container. Here is the common logic to pull image from Azure container register. Testing pipeline in use with the script: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1172146&view=logs&j=dc056dfc-c0cf-5958-c8c4-8da4f91a3739&t=bfb6cede-7671-5504-0a11-79b13ef63703
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
eng/common/pipelines/templates/steps/docker-pull-image.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
parameters: | ||
- name: ContainerRegistryClientId | ||
type: string | ||
- name: ContainerRegistryClientSecret | ||
type: string | ||
- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters