Use docker to do package validation. (#3020)

Co-authored-by: Sima Zhu <sizhu@microsoft.com>
This commit is contained in:
Azure SDK Bot 2021-11-01 23:04:13 -07:00 committed by GitHub
parent b028304d82
commit 10861b3c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View File

@ -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 }}

View File

@ -24,13 +24,20 @@ docs generation from pacakges which are not published to the default feed). This
variable is meant to be used in the domain-specific business logic in
&$UpdateDocsMsPackagesFn
.PARAMETER ImageId
Optional The docker image for package validation in format of '$containerRegistry/$imageName:$tag'.
e.g. azuresdkimages.azurecr.io/jsrefautocr:latest
#>
param (
[Parameter(Mandatory = $true)]
[string] $DocRepoLocation, # the location of the cloned doc repo
[Parameter(Mandatory = $false)]
[string] $PackageSourceOverride
[string] $PackageSourceOverride,
[Parameter(Mandatory = $false)]
[string] $ImageId
)
. (Join-Path $PSScriptRoot common.ps1)