7 CI/CD Pipelines as Code
This chapter covers:
- Designing a CI/CD pipeline as code on GCP
- Two-stage deployments for separating static and dynamic infrastructure
- Iterating over complex types with for-each expressions and dynamic blocks
- Implicit vs. explicit providers
- Creating custom resources with local-exec provisioners
CI/CD stands for Continuous Integration (CI) and Continuous Deployment (CD). It refers to the DevOps practice of enforcing automation in every step of software delivery. Teams that practice a culture of CI/CD are proven to be more agile, and able to deploy code changes more quickly, than teams that do not practice a culture of CI/CD. There is also the ancillary benefit of improving software quality, as faster code delivery tends to result in smaller, less risky deployments.
A CI/CD pipeline is a process that describes how code actually gets from version control systems through to end users. Each stage of a CI/CD pipeline performs some discreet task, such as building, unit testing, and publishing application source code (see figure 7.1).
Figure 7.1 A CI/CD pipeline has multiple stages,, which automate the flow of software delivery
