Skip to content

Commit

Permalink
Skip azcopy download if it already exists (Azure#21548)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
  • Loading branch information
azure-sdk and hallipr authored Apr 21, 2022
1 parent b364cc8 commit 93d2c21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions eng/common/pipelines/templates/steps/publish-blobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ parameters:
steps:
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
- pwsh: |
Invoke-WebRequest -MaximumRetryCount 10 -Uri "https://aka.ms/downloadazcopy-v10-windows" -OutFile "azcopy.zip" | Wait-Process;
Expand-Archive -Path "azcopy.zip" -DestinationPath "$(Build.BinariesDirectory)/azcopy/"
if (!(Test-Path '$(Build.BinariesDirectory)/azcopy/azcopy_windows_amd64_*/azcopy.exe')) {
Invoke-WebRequest -MaximumRetryCount 10 -Uri "https://aka.ms/downloadazcopy-v10-windows" -OutFile "azcopy.zip" | Wait-Process;
Expand-Archive -Path "azcopy.zip" -DestinationPath "$(Build.BinariesDirectory)/azcopy/" -Force
}
workingDirectory: $(Build.BinariesDirectory)
displayName: Download and Extract azcopy Zip

Expand Down

0 comments on commit 93d2c21

Please sign in to comment.