A CI/CD pipeline is a series of orchestrated steps designed to bring source code to production. These steps include building, packaging, testing, validation, infrastructure verification, and deployment to all necessary environments. Depending on organizational structures and the team, multiple pipelines may be needed to achieve this goal. A CI/CD pipeline can be triggered by some sort of event, such as a pull request from a source code repository (e.g., a code change), the presence of a new artifact in an artifact repository, or some sort of regular schedule to match a release cadence.
Benefits of the CI/CD pipeline
Unlike software languages, where you can adopt approaches and design patterns from one company to the next, deployments are almost always unique. Very rarely are two applications (and their supporting infrastructure) the same. Software development and delivery are iterative exercises, and pipelines should be run multiple times a day, including for bug fixes. By adopting a systematic approach with a CI/CD pipeline, teams can gain a clearer understanding of what’s needed to bring their ideas to production. Because pipelines are systemic, bottlenecks can be easily identified and resolved compared to a disjointed, human-driven process with multiple deployment steps.
Stages of a CI/CD pipeline
The steps that make up a CI/CD pipeline are distinct subsets of activities grouped together into what’s known as a pipeline stage. Typical pipeline stages include:
1) Build – The phase in which the application is compiled.
2) Test – The phase in which the code is tested.
3) Release – The phase in which the application is delivered to the repository.
4) Deployment – In this phase, the code is deployed to production.
5) Validation – In this phase, the software is validated for the presence of known vulnerabilities (CVEs).
How Automated CI/CD Pipelines Help Developer Teams
In modern organizations, the CI/CD pipeline is the channel for bringing developer code into production. Software engineering is an iterative exercise, and with automated CI/CD pipelines , engineers can execute pipelines without human intervention. Imagine if every time you needed to run a test suite or prepare the infrastructure for the next environment, you had to coordinate with an external team. This would reduce iterations and extend the steps, increasing confidence and preventing you from looking foolish in front of your peers.
By enabling self-service, developers can learn the rigor their changes require and make adjustments more quickly. One of the primary goals of DevOps teams is to enable greater pipeline learnability and usability. Some environment-driven pipelines could allow developers to execute up to the pre-production stage, then require another pipeline to reach production environments. This would allow for many iterations until the development team becomes comfortable with the pipeline. Fully automated CI/CD pipelines would go a step further and fully automate production.