Introduction
CI/CD stands for continuous integration and continuous delivery/deployment. It can be described as a set of practices with the purpose of streamlining and accelerating the software development lifecycle.
What does Continuous integration (CI) mean?
Continuous integration (CI) is the act of automatically and consistently integrating code changes into a source code repository. CI is also the set of practices responsible for building and testing the code in order to find potential errors early on and enhancing the productivity of the development process.
Merging code changes and testing the code frequently does not only help developers finding errors quicker, it also reduces the risk of errors from occurring.
What does continuous delivery (CD) mean?
Continuous delivery (CD) describes the set of practices responsible for preparing the tested code right before deployment.
To get a better understanding, here are some examples of what type of tasks that the continuous delivery stage covers:
- Packaging the compiled code into a deployable format such as a Docker image or a .zip file.
- Infrastructure Provisioning, which means using “Infrastructure as Code” (IaC) to automatically set up the necessary cloud resources for deploying and hosting the application.
- Automatically updating the environment variables such as API keys and database connection strings when the code goes from development to production.
- Scanning the compiled code for vulnerabilities right before deployment.
What does continuous deployment mean?
Continuous deployment gives developers the ability to automatically deploy their application to the cloud with minimum human interaction. Once a developer successfully pushes their newly written code into the repository without any errors occurring during the testing stage. The new update will get automatically integrated into the app and re-deployed into the production stage, making it instantly available to the customers.
What are CI/CD pipelines?
A CI/CD pipeline is an automated process that is being maintained by a DevOps team to automate the testing and deployment of their application.
To get a better understanding this is how a CI/CD pipeline could look like:
- Developer sends a git push request to a Github repository
- Github repository receives the new code update.
- Github repository tests the app and builds the app and then package it into a .zip file.
- The Github repository sends the .zip file to AWS Elastic Beanstalk that provisions an EC2 server where the app gets deployed.
Why is CI/CD important?
CI/CD is important because it:
- Accelerates software delivery
- Reduces downtime
- improves product quality through automation
- Prevents merge conflicts and other types of errors from occurring
Sources: