Continuous Deployment is a software release process where in the latest code changes are automatically deployment to various environments and passes through the automated testing. Continuous Deployment at it best , allows production deployment with no manual intervention. This post introduces you to to the various stages of Continuous Deployment and its benefits/drawback.
Continuous Deployment is sometimes confused with Continuous Delivery. The main different is that Continuous Delivery involved some kind of Manual efforts ( either to validates or to approve/reject deployments to environments) while Continuous Deployment is complete automated.
Advantages of Continuous Deployment
- Increased Productivity
- Allows quick response to a market feedback, production bug resolution
- Real time Feedback
- Receive realtime feedback from customer as soon as new features are deployed
- A/B Testing
There are some drawbacks with Continuous Deployment as well such as high engineering and maintenance cost.
Continuous Deployment Stages
Continuous Deployment typically involved multiple stages , one for each environment
Every stage above will have below tasks
- Steps to deploy the artifacts
- Depending on environment and infrastructure (Cloud, On prem etc.) steps to deploy the artifacts (zip, container image)
- Automated Testing
- Automated testing post deployment, for front end , unit testing and / or Back End , APIs.
- Monitoring the application post deployment and take actions accordingly ( promote to new stage or rollback)
- Rollback configuration
- Rollback to previous success artifacts in case of new deployment fails
Continuous Deployment – Best Practices
- Code Repository
- Maintain the application source code in centrally managed source control
- Ensure branching strategy is applied
- Frequent Commits
- Ensure frequent commits ( at-least once a day) and also merge to main /production branch
- CI Implementation
- Ensure to have a CI process with Unit tests running