From f07a8e2656e3649e016e2ad3a5bf2b85db7bfe41 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 25 Feb 2022 13:05:55 -0800 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 2771 (#3377) * Fix up parameters * Update general azcopy tool for copying from blobstorage Co-authored-by: Chidozie Ononiwu --- eng/common/scripts/copy-from-blobstorage.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 eng/common/scripts/copy-from-blobstorage.ps1 diff --git a/eng/common/scripts/copy-from-blobstorage.ps1 b/eng/common/scripts/copy-from-blobstorage.ps1 new file mode 100644 index 000000000..3cc1133ae --- /dev/null +++ b/eng/common/scripts/copy-from-blobstorage.ps1 @@ -0,0 +1,12 @@ +param ( + [Parameter(Mandatory = $true)] + [string] $SourceBlobPath, + [Parameter(Mandatory = $true)] + [string] $ApplicationId, + [Parameter(Mandatory = $true)] + [string] $DestinationDirectory +) + +azcopy login --service-principal --application-id $ApplicationId +Write-Host "Copying from $SourceBlobPath to $DestinationDirectory ..." +azcopy cp "${SourceBlobPath}/*" $DestinationDirectory --recursive=true \ No newline at end of file