Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Deployment of React SPA to Azure Storage not working

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.

2 answers

1 accepted

0 votes
Answer accepted

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

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

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

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

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

Like Ørjan Solli likes this

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

Disregard this answer. It's a comment.

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 Samary Barreto file. Can anyone suggest how to get rid of this error?

CC : @Ørjan Solli 

Thank you,

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'

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
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

788 views 15 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you