-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed single file blob upload #7222
fixed single file blob upload #7222
Conversation
…ttps://github.com/Microsoft/vsts-tasks into Microsoft/users/raagra/afc-single-file-upload-fix
…ttps://github.com/Microsoft/vsts-tasks into Microsoft/users/raagra/afc-single-file-upload-fix
…ttps://github.com/Microsoft/vsts-tasks into Microsoft/users/raagra/afc-single-file-upload-fix
…ttps://github.com/Microsoft/vsts-tasks into Microsoft/users/raagra/afc-single-file-upload-fix
…ttps://github.com/Microsoft/vsts-tasks into Microsoft/users/raagra/afc-single-file-upload-fix
Tasks/AzureFileCopyV2/Utility.ps1
Outdated
|
||
$uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:$sourcePath /Dest:$containerURL /DestKey:`"$storageKey`" $additionalArguments" | ||
$uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:$resolvedSourcePath /Dest:$containerURL /DestKey:`"$storageKey`" $additionalArguments" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log the upload to blob command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already doing that above
Tasks/AzureFileCopyV2/Utility.ps1
Outdated
{ | ||
$fileInfo = Get-Item $sourcePath | ||
$resolvedSourcePath = $fileInfo.Directory.FullName | ||
$additionalArguments += " /Pattern:$($fileInfo.Name)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fileinfo can have white spaces in name here. It should be enclosed in quotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Tasks/AzureFileCopyV2/Utility.ps1
Outdated
@@ -275,16 +293,16 @@ function Upload-FilesToAzureContainer | |||
} | |||
finally | |||
{ | |||
Handle-AzCopyLogs -isLogsPresent $useDefaultArguments -logsFilePath $azCopyLogFilePath -ErrorAction SilentlyContinue | |||
Handle-AzCopyLogs -isLogsPresent $useDefaultArguments -logsFilePath "$azCopyLogFilePath" -ErrorAction SilentlyContinue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, you do not need to enclose it in double quotes.
Tasks/AzureFileCopyV2/Utility.ps1
Outdated
$blobPrefix = $blobPrefix.Trim() | ||
$containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix).Trim("/") | ||
$azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe" | ||
|
||
Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:$sourcePath /Dest:$containerURL /DestKey:`"*****`" $additionalArguments" | ||
Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:`"$resolvedSourcePath`" /Dest:`"$containerURL`" /DestKey:`"*****`" $additionalArguments" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be better if you write this with ##[command] and write it to output and not the verbose stream. Will be better experience. And no need to repeat the command here and in the next line. create it once, and then use it wherever. Later if this command changes, you will need to update at only place.
* fixed single file blob upload * fixed single file blob upload * fixed L0 * clean target issue + pr comments * pr feedback
No description provided.