Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Deployment of React SPA to Azure Storage not working

Rhuan Barreto July 25, 2019

This is my pipelines file (Redacted the blob account name):

image: node:10

pipelines
:
branches:
master:
- step:
name: Deploy to Azure
deployment: production
caches:
- node
script:
- npm install
- npm run build
- pipe: microsoft/azure-storage-deploy:1.1.1
variables:
SOURCE: 'build'
DESTINATION: 'https://myblob.blob.core.windows.net/\$web'
DESTINATION_SAS_TOKEN: $SAS_TOKEN

This is the error I get:

Status: Downloaded newer image for mspipes/azure-storage-deploy:1.1.1
INFO: Starting deployment to Azure storage...
azcopy --quiet --source "build" --destination "https://myblob.blob.core.windows.net/$web" --recursive --dest-sas "$SAS_TOKEN"
[2019/07/25 06:59:34][ERROR] /opt/atlassian/pipelines/agent/build/build/static/js/main.6ce3bb03.chunk.js: The transfer failed.
The requested URI does not represent any resource on the server.
The requested URI does not represent any resource on the server.
RequestId:f44c2cb6-c01e-0072-59b6-428a09000000
Time:2019-07-25T06:59:34.0814673Z

[2019/07/25 06:59:34][ERROR] /opt/atlassian/pipelines/agent/build/build/static/js/runtime~main.a8a9905a.js: The transfer failed.
The requested URI does not represent any resource on the server.
The requested URI does not represent any resource on the server.
RequestId:15e5a776-b01e-0054-17b6-4211bd000000
Time:2019-07-25T06:59:34.0751369Z

[2019/07/25 06:59:34][ERROR] /opt/atlassian/pipelines/agent/build/build/static/js/2.65423c1e.chunk.js: The transfer failed.
The requested URI does not represent any resource on the server.
The requested URI does not represent any resource on the server.
RequestId:db89310d-101e-0070-60b6-4288f3000000
Time:2019-07-25T06:59:34.0665324Z
[2019/07/25 06:59:34][ERROR] /opt/atlassian/pipelines/agent/build/build/static/media/trolltunga.b85fa6d7.jpg: The transfer failed.
The requested URI does not represent any resource on the server.
The requested URI does not represent any resource on the server.
RequestId:2d8d9dbb-701e-0006-19b6-420c4f000000
Time:2019-07-25T06:59:34.0772614Z

[2019/07/25 06:59:34] Transfer summary:
-----------------
Total files transferred: 10
Transfer successfully: 6
Transfer skipped: 0
Transfer failed: 4
Elapsed time: 00.00:00:02

And the deployment failed.

3 answers

1 accepted

0 votes
Answer accepted
Ørjan Solli July 31, 2019

Set the destination to "https://myblob.blob.core.windows.net/\$web" to esqape the $-sign

Rhuan Barreto July 31, 2019

Have you tried to do this? It doesn’t work.

Ørjan Solli July 31, 2019

You must set it as a variable. Hardcoding it won't work. 

Stefan Naegeli October 23, 2019

Thank you! That solved my issue. I had to escape $web AND extracted the URL to a variable. Too bad that stuff is nowhere mentioned in the docs.

Like # people like this
Ryan Mueller December 8, 2019

Oh snap! Thank you @Ørjan Solli that little fact just saved me a lot of trouble.

Like Ørjan Solli likes this
0 votes
Victor Ferreira April 9, 2024

Hello everyone, is this an official repository by Microsoft?

0 votes
Rhuan Barreto July 25, 2019

After, I discovered that the files are being uploaded to the $root container, not the $web.

Disregard this answer. It's a comment.

Vishal_infy March 10, 2020

Stuck with the same issue since couple of days.

How did you guys manage to resolve the above error?

I have even declared the variable in the repository variables in the Bitbucket, but landed with no luck.

My YML file exactly looks like @Rhuan Barreto file. Can anyone suggest how to get rid of this error?

CC : @Ørjan Solli 

Thank you,

Ørjan Solli March 10, 2020

I don't quite remember, but I think you need to remove the DESTINATION from the YML file and put it in the repository variables or deployments as DESTINATION: 'https://myblob.blob.core.windows.net/\$web'

Vishal_infy March 10, 2020

Yes @Ørjan Solli , it worked.

One more thing, we should also need to remove the SAS Token from the yml file and declare it in the repository variables only. 

In the official documentation, it was not mentioned : https://bitbucket.org/microsoft/azure-storage-deploy/src/master/README.md

Thank you,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events