What is continuous deployment?
Tags: webdev, programming, devops, cloud
Published: 2022-10-31 14:00:00

After working on a new feature or an improvement, it's normal that you want to deliver these changes to your users as fast as possible. Depending on your deployment pipeline, confidently deploying changes to production might include coordinating with whoever is leading on-call, getting their approval, manually deploying your changes, spending hours to monitor how it goes, and performing a rollback in case something goes wrong.


**Continuous deployment automates the deployment process**, which lets you deliver new features and improvements to your applications faster than with continuous delivery and other manual processes.

In this blog post, we dive into the topic of continuous deployment: What is required to build a continuous deployment pipeline, the value it adds, how it differs from continuous delivery, and how deploying on Koyeb gives you a built-in continuous deployment pipeline.

**Table of contents**

* [Building a continuous deployment pipeline requires strong testing, monitoring, and rollback capabilities](#building-a-continuous-deployment-pipeline-requires-strong-testing-monitoring-and-rollback-capabilities)
* [Deliver value and troubleshoot faster with continuous deployments](#deliver-value-and-troubleshoot-faster-with-continuous-deployments)
* [CD stands for Continuous Delivery and Continuous Deployment](#cd-stands-for-continuous-delivery-and-continuous-deployment)
* [Built-in continuous deployment on the Koyeb Serverless Platform](#built-in-continuous-deployment-on-koyeb)

## Building a continuous deployment pipeline requires strong testing, monitoring, and rollback capabilities

Automating the deployment of new code into your production environment requires you to build **strong testing, monitoring, and rollback capabilities**. The more robust these components, the more you can trust your continuous deployment pipeline and enjoy its benefits. 

### Comprehensive tests

Your continuous deployment pipeline is only as good as your tests. You'll want to test the changes according to the expectations and criteria planned from the start. To develop the best tests, you might want to create 
the tests for your planned changes before you write any code.
 
<p align="center">
  <img src="https://www.koyeb.com/static/images/blog/test-your-code.png" alt="Image" width="800" height="600" />
</p>

Several tools are designed to test code as soon as you push new code, such as: [Jenkins](//jenkins.io/), [CircleCI](//circleci.com/), and [GitHub Actions](//github.com/features/actions). When your changes pass all your purpose-built tests, you can be confident when deploying your new changes to production. To read more about the importance of testing when building a continuous deployment pipeline, check out this [post](https://instagram-engineering.com/continuous-deployment-at-instagram-1e18548f01d1) from Instagram's Engineering team.

### Dependable monitoring

The next thing you'll need for a continuous deployment pipeline is monitoring you can count on. You will want to receive an alert as soon as possible in case your deployment fails and services become unhealthy or unavailable.

When Heroku's Runtime team [wrote](https://blog.heroku.com/automated-continuous-deployment-at-heroku) about transitioning to automated continuous deployments, they emphasized the important role monitoring plays in their pipeline. Whenever deploying a change, make sure to list which alerts you'll need to monitor to know if everything is running smoothly.

### Easy rollbacks

The ability to roll back easily and quickly is the safety mechanism for any continuous deployment pipeline. As [Instagram's Engineering](https://instagram-engineering.com/continuous-deployment-at-instagram-1e18548f01d1) team put it, "Bad changes will get out, but that’s okay. You just need to detect this quickly, and be able to roll back quickly."

Your deployment strategy will need backward and forward compatibility. In case a bad commit goes all the way through the pipeline, being able to revert to a healthy version of your service is the key to keeping your services up and running.

## Deliver value and troubleshoot faster with continuous deployments

There are a lot of real-world impacts that go hand in hand when you deploy your changes.

Continuous deployment lets you push your changes fast without having to wait idly. The faster your changes reach your users, the faster those changes add value to their lives. In turn, the sooner your users interact with your changes. the sooner you can receive their feedback. This feedback is great in case you need to troubleshoot any unexpected issues or if you want to iterate and improve the changes any further.

<p align="center">
  <img src="https://www.koyeb.com/static/images/blog/continuous-delivery-cycle.png" alt="Image" width="800" height="600" />
</p>

Plus, some argue [not deploying continuously has steep financial costs](https://charity.wtf/2021/02/19/how-much-is-your-fear-costing-you/).

## CD stands for Continuous Delivery and Continuous Deployment

The acronym CD can stand for either **continuous delivery** or **continuous deployment**, which can cause confusion because the only difference between these two is how code is tested before it is released.

- **Continuous delivery** involves a manual choice to push the changes into production after the code has been developed, built, and tested.
- **Continuous deployment** is the automated deployment of software after it has been developed, built, and tested.

<p align="center">
  <img src="https://www.koyeb.com/static/images/blog/continuous-deployment-versus-continuous-delivery.png" alt="Image" width="800" height="600" />
</p>

## Built-in continuous deployment on Koyeb 🥳🚀

Continuous deployments are often considered a utopic ideal to have because, in reality, they are quite challenging to build and maintain. We think every team should have a robust continuous deployment pipeline, which is why we built this infrastructure into the Koyeb platform.

Once you connect your git repository to Koyeb, each time you perform a git push to your repository, you will automatically trigger a new build and deployment for your application running on Koyeb. Your changes will go live as soon as the automatic deployment passes all of Koyeb's necessary health checks. In case the deployment fails, Koyeb keeps your latest working deployment active. This way your application is always up and running.

Your deployment strategy influences your time-to-market. Create and share value with your users faster by opting for a continuous deployment on Koyeb. [Try it for free](//app.koyeb.com/auth/signup) today and make sure to join us on the [Koyeb Community](https://community.koyeb.com/) to stay up-to-date with our latest news.