Skip to content

Commit f2177e3

Browse files
azure-sdksima-zhu
andauthored
Use docker to do package validation. (Azure#21541)
Co-authored-by: Sima Zhu <[email protected]>
1 parent c9fe094 commit f2177e3

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
parameters:
2+
- name: ContainerRegistryClientId
3+
type: string
4+
- name: ContainerRegistryClientSecret
5+
type: string
6+
- name: ImageId
7+
type: string
8+
steps:
9+
- pwsh: |
10+
$containerRegistry = ("${{parameters.ImageId}}" -split "\/")[0]
11+
docker login $containerRegistry -u "${{ parameters.ContainerRegistryClientId }}" -p "${{ parameters.ContainerRegistryClientSecret }}"
12+
displayName: Login container registry
13+
- pwsh: |
14+
docker pull '${{ parameters.ImageId}}'
15+
displayName: Pull docker image ${{ parameters.ImageId }}

eng/common/scripts/Update-DocsMsPackages.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@ docs generation from pacakges which are not published to the default feed). This
2424
variable is meant to be used in the domain-specific business logic in
2525
&$UpdateDocsMsPackagesFn
2626
27+
.PARAMETER ImageId
28+
Optional The docker image for package validation in format of '$containerRegistry/$imageName:$tag'.
29+
e.g. azuresdkimages.azurecr.io/jsrefautocr:latest
30+
2731
#>
2832
param (
2933
[Parameter(Mandatory = $true)]
3034
[string] $DocRepoLocation, # the location of the cloned doc repo
3135

3236
[Parameter(Mandatory = $false)]
33-
[string] $PackageSourceOverride
37+
[string] $PackageSourceOverride,
38+
39+
[Parameter(Mandatory = $false)]
40+
[string] $ImageId
3441
)
3542

3643
. (Join-Path $PSScriptRoot common.ps1)

0 commit comments

Comments
 (0)