Skip to content

Commit 93d2c21

Browse files
azure-sdkhallipr
andauthored
Skip azcopy download if it already exists (Azure#21548)
Co-authored-by: Patrick Hallisey <[email protected]>
1 parent b364cc8 commit 93d2c21

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

eng/common/pipelines/templates/steps/publish-blobs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ parameters:
1010
steps:
1111
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
1212
- pwsh: |
13-
Invoke-WebRequest -MaximumRetryCount 10 -Uri "https://aka.ms/downloadazcopy-v10-windows" -OutFile "azcopy.zip" | Wait-Process;
14-
Expand-Archive -Path "azcopy.zip" -DestinationPath "$(Build.BinariesDirectory)/azcopy/"
13+
if (!(Test-Path '$(Build.BinariesDirectory)/azcopy/azcopy_windows_amd64_*/azcopy.exe')) {
14+
Invoke-WebRequest -MaximumRetryCount 10 -Uri "https://aka.ms/downloadazcopy-v10-windows" -OutFile "azcopy.zip" | Wait-Process;
15+
Expand-Archive -Path "azcopy.zip" -DestinationPath "$(Build.BinariesDirectory)/azcopy/" -Force
16+
}
1517
workingDirectory: $(Build.BinariesDirectory)
1618
displayName: Download and Extract azcopy Zip
1719

0 commit comments

Comments
 (0)