Continuous integration and continuous delivery/deployment (CI/CD) encompass several automated processes commonly performed in software development, such as building, testing, and deploying a software application. CI/CD reduces human intervention during the maintenance processes of software applications.
CI/CD consists of testing frameworks such as unit tests, integration tests, and end-to-end tests, as well as deployment scripts and infrastructure-as-code tools. CI/CD efficiently validate and maintain code and ensure the software works as expected after each iteration.
An example of a complete CI/CD process would be:
Continuous integration (CI) practices frequently and automatically merging code changes from multiple developers within a shared repository. CI ensures software remains in a releasable state when new changes are added by automatically detecting integration issues. Automated build and test processes detect integration issues and validate incoming changes.
In the example CI/CD process above, developers push changes within a shared repository, and these pushes trigger Jenkins to build and test the app. These tests can ensure that the app runs in its container environment without crashing.
Continuous delivery (CD) ensures the software is always in a releasable state that can be deployed to production. If a commit successfully passes the build tests, then it is ready for deployment. Along with CI, CD minimizes manual intervention and enables efficient delivery of software updates.
After CI processes, Jenkins and GitHub both have CD pipelines that package the application for deployment. However, deployment requires manual approval from a developer for production deployments. In the example process above, this could be a developer manually applying a tag to the newly uploaded container image in Container Registry that App Platform detects and then deploys.
Continuous deployment (CD) extends CI/CD. If a commit successfully passes the automated tests, then the software application is automatically deployed to production environments without human intervention.
After CI processes, Jenkins and GitLab automatically deploy code changes to DigitalOcean’s App Platform without manual approval from a developer.