June 29, 2017
How to set up Continuous Delivery for Node.js
- Fetch dependencies
- Run Gulp/Grunt tasks, bundle assets, compile CSS, etc.
- Run unit tests
- Deploy to Stage
- Run integration tests
- Deploy to Production
Buddy lets you travel back to simple times and streamline the whole process to a single click (or push to repository) by introducing Continuous Delivery to your workflow.
Let's create a simple pipeline that will build your application and deploy it to the server:
- Sign up to Buddy and select the repository with your JS project
- Add a new pipeline and set the Trigger Mode to
On every push
- Add the 'Node.js' action and define your tasks
- Add a transfer action to your type of server (eg. SFTP)
- (Optional) You can also add a notification to keep your team updated
- Make a push to the selected branch
Continuous Deployment is a software engineering approach in which every change to code is rigorously tested before getting deployed to the Production server. The whole process is fully automated - from push to the repository, to deployment to server.
Continuous deployment pipeline example
In Continuous Delivery, the product is always in a deployment-ready state, but the deployment to the Production server needs to be performed manually:
Continuous delivery pipeline example
Continuous Delivery requires manual confirmation before deploying the application to Live. In Buddy you can achieve that by adding the 'Wait for approval' action to your workflow:
'Wait for approval' action
This way every time the pipeline is executed, all changes will be automatically tested, but no deployment will be made until the time is right.
Continuous delivery pipeline
The pipeline can be further expanded with additional actions. You can, for example:
- Dockerize your application before the deployment
- send a conditional notification to Slack in case the tests have failed
- restart servers with SSH scripts
- send HTTP POST to activate maintenance mode on the Production server or switch to atomic deployments for zero downtime
- monitor the impact of deployments on your application
Customer Success Manager