From e5d3d804348b7b2f7e60f93c6973125ad1ed9f48 Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Thu, 21 Apr 2022 15:03:20 -0700 Subject: [PATCH] Skip azcopy download if it already exists (#3188) --- eng/common/pipelines/templates/steps/publish-blobs.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/steps/publish-blobs.yml b/eng/common/pipelines/templates/steps/publish-blobs.yml index 2af016786e1b..1eadf19ca7a2 100644 --- a/eng/common/pipelines/templates/steps/publish-blobs.yml +++ b/eng/common/pipelines/templates/steps/publish-blobs.yml @@ -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