From 76f9ca779b9fe4119b70a29be1f3aa7523a60f49 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:05:59 -0700 Subject: [PATCH] Removed the update CI target packages step. (#17984) Co-authored-by: Sima Zhu --- .../templates/steps/docs-metadata-release.yml | 18 ----- eng/common/scripts/update-docs-ci.ps1 | 70 ------------------- 2 files changed, 88 deletions(-) delete mode 100644 eng/common/scripts/update-docs-ci.ps1 diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 9756ad30a151..9d52723cd506 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -56,24 +56,6 @@ steps: env: GH_TOKEN: $(azuresdk-github-pat) -- task: PowerShell@2 - displayName: 'Update Docs.MS CI Targeted Packages' - condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}',''), ne('${{ parameters.SkipPackageJson }}', true)) - inputs: - targetType: filePath - filePath: ${{ parameters.ScriptDirectory }}/update-docs-ci.ps1 - arguments: > - -ArtifactLocation ${{ parameters.ArtifactLocation }} - -WorkDirectory "${{ parameters.WorkingDirectory }}" - -RepoId ${{ parameters.RepoId }} - -Repository ${{ parameters.PackageRepository }} - -ReleaseSHA ${{ parameters.ReleaseSha }} - -DocRepoLocation "${{ parameters.WorkingDirectory }}/repo" - -Configs "${{ parameters.CIConfigs }}" - pwsh: true - env: - GH_TOKEN: $(azuresdk-github-pat) - - template: /eng/common/pipelines/templates/steps/git-push-changes.yml parameters: BaseRepoBranch: $(DefaultBranch) diff --git a/eng/common/scripts/update-docs-ci.ps1 b/eng/common/scripts/update-docs-ci.ps1 deleted file mode 100644 index 86f17d893980..000000000000 --- a/eng/common/scripts/update-docs-ci.ps1 +++ /dev/null @@ -1,70 +0,0 @@ -#Requires -Version 6.0 -# This script is intended to update docs.ms CI configuration (currently supports Java, Python, C#, JS) -# as part of the azure-sdk release. For details on calling, check `archtype--release` in each azure-sdk -# repository. - -# Where possible, this script adds as few changes as possible to the target config. We only -# specifically mark a version for Python Preview and Java. This script is intended to be invoked -# multiple times. Once for each moniker. Currently only supports "latest" and "preview" artifact selection however. -param ( - [Parameter(Mandatory = $true)] - $ArtifactLocation, # the root of the artifact folder. DevOps $(System.ArtifactsDirectory) - - [Parameter(Mandatory = $true)] - $WorkDirectory, # a clean folder that we can work in - - [Parameter(Mandatory = $true)] - $ReleaseSHA, # the SHA for the artifacts. DevOps: $(Release.Artifacts..SourceVersion) or $(Build.SourceVersion) - - [Parameter(Mandatory = $true)] - $RepoId, # full repo id. EG azure/azure-sdk-for-net DevOps: $(Build.Repository.Id). Used as a part of VerifyPackages - - [Parameter(Mandatory = $true)] - [ValidateSet("Nuget","NPM","PyPI","Maven")] - $Repository, # EG: "Maven", "PyPI", "NPM" - - [Parameter(Mandatory = $true)] - $DocRepoLocation, # the location of the cloned doc repo - - [Parameter(Mandatory = $true)] - $Configs # The configuration elements informing important locations within the cloned doc repo -) - -. (Join-Path $PSScriptRoot common.ps1) - -$targets = ($Configs | ConvertFrom-Json).targets - -#{ -# path_to_config: -# mode: -# monikerid: -# content_folder: -# suffix: -#} - -$apiUrl = "https://api.github.com/repos/$repoId" -$pkgs = VerifyPackages -artifactLocation $ArtifactLocation ` - -workingDirectory $WorkDirectory ` - -apiUrl $apiUrl ` - -continueOnError $True - -foreach ($config in $targets) { - if ($config.mode -eq "Preview") { $includePreview = $true } else { $includePreview = $false } - $pkgsFiltered = $pkgs | ? { $_.IsPrerelease -eq $includePreview} - - if ($pkgsFiltered) { - Write-Host "Given the visible artifacts, CI updates against $($config.path_to_config) will be processed for the following packages." - Write-Host ($pkgsFiltered | % { $_.PackageId + " " + $_.PackageVersion }) - - if ($UpdateDocCIFn -and (Test-Path "Function:$UpdateDocCIFn")) - { - &$UpdateDocCIFn -pkgs $pkgsFiltered -ciRepo $DocRepoLocation -locationInDocRepo $config.path_to_config -monikerId $config.monikerid - } - else - { - LogWarning "The function for '$UpdateDocCIFn' was not found.` - Make sure it is present in eng/scripts/Language-Settings.ps1 and referenced in eng/common/scripts/common.ps1.` - See https://github.com/Azure/azure-sdk-tools/blob/master/doc/common/common_engsys.md#code-structure" - } - } -} \ No newline at end of file