Skip to content

Commit b61653a

Browse files
authored
fixed AzCopy path for useSanitizerActivate (#19993)
1 parent aacf013 commit b61653a

30 files changed

+75
-66
lines changed

Tasks/AzureFileCopyV4/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ function Upload-FilesToAzureContainer
236236

237237
if ($useSanitizerActivate) {
238238
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
239-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
240-
& azcopy copy $sourcePath $containerURL$containerSasToken $sanitizedArguments
239+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
240+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
241+
Invoke-Expression $uploadCommand
241242
} else {
242243
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"
243244
$uploadToBlobCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

Tasks/AzureFileCopyV4/task.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 4,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"

Tasks/AzureFileCopyV4/task.loc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 4,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"

Tasks/AzureFileCopyV5/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ function Upload-FilesToAzureContainer
250250
if ($useSanitizerActivate) {
251251
# Splitting arguments on space, but not on space inside quotes
252252
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
253-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
254-
& azcopy copy $sourcePath $containerURL$containerSasToken $sanitizedArguments
253+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
254+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
255+
Invoke-Expression $uploadCommand
255256
} else {
256257
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"
257258
$uploadToBlobCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

Tasks/AzureFileCopyV5/task.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 5,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"

Tasks/AzureFileCopyV5/task.loc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 5,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"

Tasks/AzureFileCopyV6/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ function Upload-FilesToAzureContainer
238238
if ($useSanitizerActivate) {
239239
# Splitting arguments on space, but not on space inside quotes
240240
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
241-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
242-
& azcopy copy $sourcePath $containerURL $sanitizedArguments
241+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
242+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
243+
Invoke-Expression $uploadCommand
243244
} else {
244245

245246
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

Tasks/AzureFileCopyV6/task.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 6,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"

Tasks/AzureFileCopyV6/task.loc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 6,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|4.241.2
2-
Node20_229_2|4.241.3
1+
Default|4.241.4
2+
Node20_229_2|4.241.5

_generated/AzureFileCopyV4/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ function Upload-FilesToAzureContainer
236236

237237
if ($useSanitizerActivate) {
238238
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
239-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
240-
& azcopy copy $sourcePath $containerURL$containerSasToken $sanitizedArguments
239+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
240+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
241+
Invoke-Expression $uploadCommand
241242
} else {
242243
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"
243244
$uploadToBlobCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

_generated/AzureFileCopyV4/task.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 4,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"
@@ -301,7 +301,7 @@
301301
"ServicePrincipalError": "There was an error with the service principal used for the deployment."
302302
},
303303
"_buildConfigMapping": {
304-
"Default": "4.241.2",
305-
"Node20_229_2": "4.241.3"
304+
"Default": "4.241.4",
305+
"Node20_229_2": "4.241.5"
306306
}
307307
}

_generated/AzureFileCopyV4/task.loc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 4,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"
@@ -301,7 +301,7 @@
301301
"ServicePrincipalError": "ms-resource:loc.messages.ServicePrincipalError"
302302
},
303303
"_buildConfigMapping": {
304-
"Default": "4.241.2",
305-
"Node20_229_2": "4.241.3"
304+
"Default": "4.241.4",
305+
"Node20_229_2": "4.241.5"
306306
}
307307
}

_generated/AzureFileCopyV4_Node20/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,9 @@ function Upload-FilesToAzureContainer
236236

237237
if ($useSanitizerActivate) {
238238
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
239-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
240-
& azcopy copy $sourcePath $containerURL$containerSasToken $sanitizedArguments
239+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
240+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
241+
Invoke-Expression $uploadCommand
241242
} else {
242243
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"
243244
$uploadToBlobCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

_generated/AzureFileCopyV4_Node20/task.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 4,
1616
"Minor": 241,
17-
"Patch": 3
17+
"Patch": 5
1818
},
1919
"demands": [
2020
"azureps"
@@ -305,7 +305,7 @@
305305
"ServicePrincipalError": "There was an error with the service principal used for the deployment."
306306
},
307307
"_buildConfigMapping": {
308-
"Default": "4.241.2",
309-
"Node20_229_2": "4.241.3"
308+
"Default": "4.241.4",
309+
"Node20_229_2": "4.241.5"
310310
}
311311
}

_generated/AzureFileCopyV4_Node20/task.loc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 4,
1616
"Minor": 241,
17-
"Patch": 3
17+
"Patch": 5
1818
},
1919
"demands": [
2020
"azureps"
@@ -305,7 +305,7 @@
305305
"ServicePrincipalError": "ms-resource:loc.messages.ServicePrincipalError"
306306
},
307307
"_buildConfigMapping": {
308-
"Default": "4.241.2",
309-
"Node20_229_2": "4.241.3"
308+
"Default": "4.241.4",
309+
"Node20_229_2": "4.241.5"
310310
}
311311
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|5.241.2
2-
Node20_229_2|5.241.3
1+
Default|5.241.4
2+
Node20_229_2|5.241.5

_generated/AzureFileCopyV5/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ function Upload-FilesToAzureContainer
250250
if ($useSanitizerActivate) {
251251
# Splitting arguments on space, but not on space inside quotes
252252
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
253-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
254-
& azcopy copy $sourcePath $containerURL$containerSasToken $sanitizedArguments
253+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
254+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
255+
Invoke-Expression $uploadCommand
255256
} else {
256257
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"
257258
$uploadToBlobCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

_generated/AzureFileCopyV5/task.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 5,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"
@@ -301,7 +301,7 @@
301301
"AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent."
302302
},
303303
"_buildConfigMapping": {
304-
"Default": "5.241.2",
305-
"Node20_229_2": "5.241.3"
304+
"Default": "5.241.4",
305+
"Node20_229_2": "5.241.5"
306306
}
307307
}

_generated/AzureFileCopyV5/task.loc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 5,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"
@@ -301,7 +301,7 @@
301301
"AzModuleNotFound": "ms-resource:loc.messages.AzModuleNotFound"
302302
},
303303
"_buildConfigMapping": {
304-
"Default": "5.241.2",
305-
"Node20_229_2": "5.241.3"
304+
"Default": "5.241.4",
305+
"Node20_229_2": "5.241.5"
306306
}
307307
}

_generated/AzureFileCopyV5_Node20/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ function Upload-FilesToAzureContainer
250250
if ($useSanitizerActivate) {
251251
# Splitting arguments on space, but not on space inside quotes
252252
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
253-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
254-
& azcopy copy $sourcePath $containerURL$containerSasToken $sanitizedArguments
253+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
254+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
255+
Invoke-Expression $uploadCommand
255256
} else {
256257
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"
257258
$uploadToBlobCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

_generated/AzureFileCopyV5_Node20/task.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 5,
1616
"Minor": 241,
17-
"Patch": 3
17+
"Patch": 5
1818
},
1919
"demands": [
2020
"azureps"
@@ -305,7 +305,7 @@
305305
"AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent."
306306
},
307307
"_buildConfigMapping": {
308-
"Default": "5.241.2",
309-
"Node20_229_2": "5.241.3"
308+
"Default": "5.241.4",
309+
"Node20_229_2": "5.241.5"
310310
}
311311
}

_generated/AzureFileCopyV5_Node20/task.loc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 5,
1616
"Minor": 241,
17-
"Patch": 3
17+
"Patch": 5
1818
},
1919
"demands": [
2020
"azureps"
@@ -305,7 +305,7 @@
305305
"AzModuleNotFound": "ms-resource:loc.messages.AzModuleNotFound"
306306
},
307307
"_buildConfigMapping": {
308-
"Default": "5.241.2",
309-
"Node20_229_2": "5.241.3"
308+
"Default": "5.241.4",
309+
"Node20_229_2": "5.241.5"
310310
}
311311
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|6.241.2
2-
Node20_229_2|6.241.3
1+
Default|6.241.4
2+
Node20_229_2|6.241.5

_generated/AzureFileCopyV6/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ function Upload-FilesToAzureContainer
238238
if ($useSanitizerActivate) {
239239
# Splitting arguments on space, but not on space inside quotes
240240
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
241-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
242-
& azcopy copy $sourcePath $containerURL $sanitizedArguments
241+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
242+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
243+
Invoke-Expression $uploadCommand
243244
} else {
244245

245246
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

_generated/AzureFileCopyV6/task.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 6,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"
@@ -288,7 +288,7 @@
288288
"AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent."
289289
},
290290
"_buildConfigMapping": {
291-
"Default": "6.241.2",
292-
"Node20_229_2": "6.241.3"
291+
"Default": "6.241.4",
292+
"Node20_229_2": "6.241.5"
293293
}
294294
}

_generated/AzureFileCopyV6/task.loc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 6,
1616
"Minor": 241,
17-
"Patch": 2
17+
"Patch": 4
1818
},
1919
"demands": [
2020
"azureps"
@@ -288,7 +288,7 @@
288288
"AzModuleNotFound": "ms-resource:loc.messages.AzModuleNotFound"
289289
},
290290
"_buildConfigMapping": {
291-
"Default": "6.241.2",
292-
"Node20_229_2": "6.241.3"
291+
"Default": "6.241.4",
292+
"Node20_229_2": "6.241.5"
293293
}
294294
}

_generated/AzureFileCopyV6_Node20/Utility.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ function Upload-FilesToAzureContainer
238238
if ($useSanitizerActivate) {
239239
# Splitting arguments on space, but not on space inside quotes
240240
$sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)')
241-
Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
242-
& azcopy copy $sourcePath $containerURL $sanitizedArguments
241+
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
242+
$uploadCommand = "& `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments"
243+
Invoke-Expression $uploadCommand
243244
} else {
244245

245246
Write-Output "##[command] & `"$azCopyExeLocation`" copy `"$sourcePath`" `"$containerURL`" $additionalArguments"

_generated/AzureFileCopyV6_Node20/task.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 6,
1616
"Minor": 241,
17-
"Patch": 3
17+
"Patch": 5
1818
},
1919
"demands": [
2020
"azureps"
@@ -292,7 +292,7 @@
292292
"AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent."
293293
},
294294
"_buildConfigMapping": {
295-
"Default": "6.241.2",
296-
"Node20_229_2": "6.241.3"
295+
"Default": "6.241.4",
296+
"Node20_229_2": "6.241.5"
297297
}
298298
}

0 commit comments

Comments
 (0)