Closed jflam closed 5 years ago
I wanted to add some color to my scenario: I'm trying to build a continuous integration Azure Pipeline that will generate a static website using hugo on a Ubuntu 16.04 LTS worker. Ideally I would:
This does not appear possible based on my experiments. I might be able to do a convoluted workaround using the az storage blob batch-upload command as well.
If you search for "hugo azure pipeline azure blob storage" there's a bunch of folks who have gone down this path in a semi-automated fashion. The missing piece seems to be azcopy supporting copying to $web containers.
Is there an ETA for this support?
Updating this thread: I do have a workaround using az storage blob batch-upload:
az storage blob upload-batch --account-name <name> --source . -d \$web --account-key <storage account key>
Escaping the $
in $web
is necessary as I'm running in bash.
I think that AzCopy will ultimately be a better solution than upload-batch because:
sync
command which should be more efficient over the wireDoes that make sense?
Hi @jflam, thanks for reaching out!
AzCopy already supports uploading to $web, could you please make sure to escape the $
properly in the URL?
Thanks. There are two things that I found that I needed to do:
I can't remember if this was documented anywhere. I seem to recall seeing doc folks not wanting to document things specifically for bash
. I think this is a mistake.
Super happy with my Azure Pipelines powered automated build for my blog. Now I just have to finish struggling with getting SSL enabled (that also suffers from doc problems).
I really like the fact that v3 is compiled to a single executable. Please do make an effort to make sure that older docs point to the latest version (and to make clear what the benefits of v3 are!).
Hi @jflam, thanks for the suggestions!
We do show the quotes in the example when you run azcopy cp --help
, but in hindsight we should probably show single quotes instead of double quotes.
Which version of the AzCopy was used?
v10.0.4.preview
Note: The version is visible when running AzCopy without any argument
Which platform are you using? (ex: Windows, Mac, Linux)
Windows
What command did you run?
copy
Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.
What problem was encountered?
I'm trying to copy to an static web site container, i.e., $web. I can copy just fine to a container ("foo") that I create in the same storage account. However, any attempt to copy to the $web container fails.
Here's a sample snippet from the log files with sig elided:
How can we reproduce the problem in the simplest way?
Run the copy using a SAS token generated for the $web container.
Have you found a mitigation/solution?
No.