From a43dbe6999ae6a5d8cab508b644a921622e286ed Mon Sep 17 00:00:00 2001 From: Amruta Kawade Date: Tue, 27 Oct 2020 20:41:58 +0530 Subject: [PATCH 1/2] virtual directories are not created in AzureFileCopyV4 using blob prefix --- Tasks/AzureFileCopyV4/Utility.ps1 | 3 ++- Tasks/AzureFileCopyV4/task.json | 4 ++-- Tasks/AzureFileCopyV4/task.loc.json | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Tasks/AzureFileCopyV4/Utility.ps1 b/Tasks/AzureFileCopyV4/Utility.ps1 index 83b4902cf228..e7e910442ae5 100644 --- a/Tasks/AzureFileCopyV4/Utility.ps1 +++ b/Tasks/AzureFileCopyV4/Utility.ps1 @@ -213,7 +213,8 @@ function Upload-FilesToAzureContainer Write-Output (Get-VstsLocString -Key "AFC_UploadFilesStorageAccount" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) $blobPrefix = $blobPrefix.Trim() - $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix).Trim("/") + $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix.Trim("/")) + $containerURL = $containerURL + "/" $containerURL = $containerURL.Replace('$','`$') $azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe" diff --git a/Tasks/AzureFileCopyV4/task.json b/Tasks/AzureFileCopyV4/task.json index 7f55768a2f7e..5751b8a36c0a 100644 --- a/Tasks/AzureFileCopyV4/task.json +++ b/Tasks/AzureFileCopyV4/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 4, - "Minor": 175, - "Patch": 5 + "Minor": 178, + "Patch": 0 }, "demands": [ "azureps" diff --git a/Tasks/AzureFileCopyV4/task.loc.json b/Tasks/AzureFileCopyV4/task.loc.json index 84ee25e5f009..2d1bc990f488 100644 --- a/Tasks/AzureFileCopyV4/task.loc.json +++ b/Tasks/AzureFileCopyV4/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 4, - "Minor": 175, - "Patch": 5 + "Minor": 178, + "Patch": 0 }, "demands": [ "azureps" From ee5a73fc706fe4755f5c1da55720109c56e17df9 Mon Sep 17 00:00:00 2001 From: Amruta Kawade Date: Tue, 27 Oct 2020 21:04:54 +0530 Subject: [PATCH 2/2] removed extra / from container --- Tasks/AzureFileCopyV4/Utility.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tasks/AzureFileCopyV4/Utility.ps1 b/Tasks/AzureFileCopyV4/Utility.ps1 index e7e910442ae5..8df7925bac79 100644 --- a/Tasks/AzureFileCopyV4/Utility.ps1 +++ b/Tasks/AzureFileCopyV4/Utility.ps1 @@ -213,7 +213,7 @@ function Upload-FilesToAzureContainer Write-Output (Get-VstsLocString -Key "AFC_UploadFilesStorageAccount" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) $blobPrefix = $blobPrefix.Trim() - $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix.Trim("/")) + $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix).Trim("/") $containerURL = $containerURL + "/" $containerURL = $containerURL.Replace('$','`$') $azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe"