Bitbucket has from some time ago availability of Pipelines and I've been strugling, not from the Bitbucket part, but the Azure part as I can't find an easy way to deploy.
in my BitBucket, I have a bitbucket-pipelines.yml
with
image: node:8.9.4
pipelines:
default:
- step:
name: Build and test
caches:
- node
script: # install packages and run tests
- npm install
- npm test
- step:
name: Deploy to Azure
script:
- git push https://$AZURE_LOGIN:$AZURE_PASSWORD@$AZURE_APP_NAME.scm.azurewebsites.net/$AZURE_APP_NAME.git master
and all works well from BB part, issue is that the code sent to Azure, from that command line is the application source, and I can't find an easy way to tell Azure to run npm install
and I end up with Internal Server Error where a package was not found when I try to run the website after being deployed ...
I've then created a VSTS account to configure Continuous Delivery in both parts... the option CD in Azure portal as well create a pipeline in VSTS...
(through Azure portal directly)
My question is simple... in order to avoid anything from Azure portal (seems to complicate at the moment, or it's just me as I'm more used to work with AWS and Heroku), is there a way to actually deploy from BitBucket automagically?
How to deploy nodeJs app from Bitbucket to Azure
A simple solution is to use Continuous Deployment, this link has details on how to set up, basically
npm install
will run automatically I am not sure if you need VSTS, since I imagine that your workflow is something like this (based on my assumption of how CI works)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.