I have an 'npm run build' as part of my Pipeline and I need to be able to deploy the resulting contents of the dist folder to Azure Container Blob storage.
What's the easiest way to achieve this?
How can I find out what commands are supported? e.g. AzCopy?
Hi Andrew,
There's an Azure Docker image that is supported by Microsoft which you can try using: https://hub.docker.com/r/microsoft/azure-cli/ This should be able to provide you the Azure CLI. Then you should be able to do a deployment just like your local CLI environment.
If you need to re-install NPM on that image, you can follow the instructions here: https://superuser.com/a/1187246
i.e. Run
$ apk add --update nodejs nodejs-npm
as part of your build step.
Thanks,
Phil
Hey Phil,
I forgot I was watching this question and your answer looks interesting I think I'll give it a try.
I thought I'd let both you and Andrew know that I've had some luck with using AzCopy on a docker image "promact/docker-dotnet-nodejs"
- step:
deployment: staging
trigger: manual
script:
- apt-get update && apt-get -y upgrade
- apt-get -y install rsync libunwind8
- wget -O azcopy.tar.gz https://aka.ms/downloadazcopylinux64
- tar -xzf azcopy.tar.gz
- ./install.sh - azcopy --source ../mybuildfolder --destination $url --dest-key $storageKey --recursive --set-content-type --quiet
I set the $storageKey to one of the storage keys for my container and the $url to https://<my container name>.blob.core.windows.net/$web/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.