From 8accf952d1fda5184a010c8c239e978ba041dae6 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:25:43 -0800 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 9331 (#1904) * Common cleanup with the docs docker images no longer being used * Remove docker-pull-image.yml --------- Co-authored-by: James Suplizio --- .../templates/steps/docker-pull-image.yml | 19 ------------------- .../steps/update-docsms-metadata.yml | 9 --------- eng/common/scripts/Update-DocsMsMetadata.ps1 | 8 -------- eng/common/scripts/Update-DocsMsPackages.ps1 | 10 +--------- 4 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 eng/common/pipelines/templates/steps/docker-pull-image.yml diff --git a/eng/common/pipelines/templates/steps/docker-pull-image.yml b/eng/common/pipelines/templates/steps/docker-pull-image.yml deleted file mode 100644 index 61e59884f7..0000000000 --- a/eng/common/pipelines/templates/steps/docker-pull-image.yml +++ /dev/null @@ -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 }}' diff --git a/eng/common/pipelines/templates/steps/update-docsms-metadata.yml b/eng/common/pipelines/templates/steps/update-docsms-metadata.yml index d989426b69..51edbc44b2 100644 --- a/eng/common/pipelines/templates/steps/update-docsms-metadata.yml +++ b/eng/common/pipelines/templates/steps/update-docsms-metadata.yml @@ -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 diff --git a/eng/common/scripts/Update-DocsMsMetadata.ps1 b/eng/common/scripts/Update-DocsMsMetadata.ps1 index d9c254a2f6..01a6c9349b 100644 --- a/eng/common/scripts/Update-DocsMsMetadata.ps1 +++ b/eng/common/scripts/Update-DocsMsMetadata.ps1 @@ -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) { diff --git a/eng/common/scripts/Update-DocsMsPackages.ps1 b/eng/common/scripts/Update-DocsMsPackages.ps1 index fc422872b0..06ee79102e 100644 --- a/eng/common/scripts/Update-DocsMsPackages.ps1 +++ b/eng/common/scripts/Update-DocsMsPackages.ps1 @@ -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 }