Sync eng/common directory with azure-sdk-tools for PR 9331 (#6193)
* Common cleanup with the docs docker images no longer being used * Remove docker-pull-image.yml --------- Co-authored-by: James Suplizio <jasupliz@microsoft.com>
This commit is contained in:
parent
a82725c7eb
commit
b2a84e5b06
@ -1,19 +0,0 @@
|
||||
parameters:
|
||||
- name: ServiceConnectionName
|
||||
type: string
|
||||
default: azuresdkimages_container-registry
|
||||
- name: ImageId
|
||||
type: string
|
||||
steps:
|
||||
- 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 }}'
|
||||
@ -29,9 +29,6 @@ parameters:
|
||||
- name: PackageSourceOverride
|
||||
type: string
|
||||
default: ''
|
||||
- name: DocValidationImageId
|
||||
type: string
|
||||
default: ''
|
||||
steps:
|
||||
- ${{ if eq(length(parameters.PackageInfoLocations), 0) }}:
|
||||
- pwsh: |
|
||||
@ -83,11 +80,6 @@ steps:
|
||||
parameters:
|
||||
WorkingDirectory: $(DocRepoLocation)
|
||||
DefaultBranchVariableName: TargetBranchName
|
||||
# Pull and build the docker image.
|
||||
- ${{ if ne(parameters.DocValidationImageId, '') }}:
|
||||
- template: /eng/common/pipelines/templates/steps/docker-pull-image.yml
|
||||
parameters:
|
||||
ImageId: '${{ parameters.DocValidationImageId }}'
|
||||
- pwsh: |
|
||||
$packageInfoJson = '${{ convertToJson(parameters.PackageInfoLocations) }}'.Trim('"').Replace("\\", "/")
|
||||
# Without -NoEnumerate, a single element array[T] gets unwrapped as a single item T.
|
||||
@ -97,7 +89,6 @@ steps:
|
||||
-DocRepoLocation "$(DocRepoLocation)" `
|
||||
-Language '${{parameters.Language}}' `
|
||||
-RepoId '${{ parameters.RepoId }}' `
|
||||
-DocValidationImageId '${{ parameters.DocValidationImageId }}' `
|
||||
-PackageSourceOverride '${{ parameters.PackageSourceOverride }}'
|
||||
displayName: Apply Documentation Updates
|
||||
|
||||
|
||||
@ -28,10 +28,6 @@ Programming language to supply to metadata
|
||||
.PARAMETER RepoId
|
||||
GitHub repository ID of the SDK. Typically of the form: 'Azure/azure-sdk-for-js'
|
||||
|
||||
.PARAMETER DocValidationImageId
|
||||
The docker image id in format of '$containerRegistry/$imageName:$tag'
|
||||
e.g. azuresdkimages.azurecr.io/jsrefautocr:latest
|
||||
|
||||
#>
|
||||
|
||||
param(
|
||||
@ -47,9 +43,6 @@ param(
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$RepoId,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$DocValidationImageId,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$PackageSourceOverride
|
||||
)
|
||||
@ -200,7 +193,6 @@ foreach ($packageInfoLocation in $PackageInfoJsonLocations) {
|
||||
$isValid = &$ValidateDocsMsPackagesFn `
|
||||
-PackageInfos $packageInfo `
|
||||
-PackageSourceOverride $PackageSourceOverride `
|
||||
-DocValidationImageId $DocValidationImageId `
|
||||
-DocRepoLocation $DocRepoLocation
|
||||
|
||||
if (!$isValid) {
|
||||
|
||||
@ -20,20 +20,13 @@ 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,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string] $ImageId
|
||||
[string] $PackageSourceOverride
|
||||
)
|
||||
|
||||
. (Join-Path $PSScriptRoot common.ps1)
|
||||
@ -61,7 +54,6 @@ function PackageIsValidForDocsOnboarding($package) {
|
||||
|
||||
return &$ValidateDocsMsPackagesFn `
|
||||
-PackageInfo $package `
|
||||
-DocValidationImageId $ImageId `
|
||||
-DocRepoLocation $DocRepoLocation
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user