-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 28438: [backport/v7.4.0] Copy azure blob with PowerShell gl…
…obal tool to private blob and move to CDN d... Copy azure blob with PowerShell global tool to private blob and move to CDN during release (#20659)
- Loading branch information
1 parent
8fb2e4c
commit 72d29a1
Showing
4 changed files
with
106 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
tools/releaseBuild/azureDevOps/templates/release-CopyGlobalTools.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
parameters: | ||
- name: sourceContainerName | ||
type: string | ||
default: 'source-container' | ||
|
||
- name: destinationContainerName | ||
type: string | ||
default: 'destination-container' | ||
|
||
- name: sourceStorageAccountName | ||
type: string | ||
default: 'source-storage-account' | ||
|
||
- name: destinationStorageAccountName | ||
type: string | ||
default: 'destination-storage-account' | ||
|
||
- name: blobPrefix | ||
type: string | ||
default: '$(Version)' | ||
|
||
steps: | ||
- template: release-SetReleaseTagAndContainerName.yml | ||
|
||
- pwsh: | | ||
Import-module '$(BUILD.SOURCESDIRECTORY)/build.psm1' | ||
Install-AzCopy | ||
displayName: Install AzCopy | ||
retryCountOnTaskFailure: 2 | ||
|
||
- pwsh: | | ||
Import-module '$(BUILD.SOURCESDIRECTORY)/build.psm1' | ||
$azcopy = Find-AzCopy | ||
Write-Verbose -Verbose "Found AzCopy: $azcopy" | ||
$sourceContainerName = "${{ parameters.sourceContainerName }}" | ||
$destinationContainerName = "${{ parameters.destinationContainerName }}" | ||
$sourceStorageAccountName = "${{ parameters.sourceStorageAccountName }}" | ||
$destinationStorageAccountName = "${{ parameters.destinationStorageAccountName }}" | ||
$blobPrefix = "${{ parameters.blobPrefix }}" | ||
$sourceBlobUrl = "https://${sourceStorageAccountName}.blob.core.windows.net/${sourceContainerName}/${blobPrefix}" | ||
Write-Verbose -Verbose "Source blob url: $sourceBlobUrl" | ||
$destinationBlobUrl = "https://${destinationStorageAccountName}.blob.core.windows.net/${destinationContainerName}" | ||
Write-Verbose -Verbose "Destination blob url: $destinationBlobUrl" | ||
& $azcopy cp $sourceBlobUrl $destinationBlobUrl --recursive | ||
$packagesPath = Get-ChildItem -Path $(System.ArtifactsDirectory)\*.deb -Recurse -File | Select-Object -First 1 -ExpandProperty DirectoryName | ||
Write-Host "sending -- vso[task.setvariable variable=PackagesRoot]$packagesPath" | ||
Write-Host "##vso[task.setvariable variable=PackagesRoot]$packagesPath" | ||
displayName: Copy blobs | ||
retryCountOnTaskFailure: 2 | ||
env: | ||
AZCOPY_AUTO_LOGIN_TYPE: MSI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters