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

7.1    A Tale of Two Deployments

 
 
 
 

7.2    CI/CD for Docker Containers on GCP

 
 
 

7.2.1   Designing the Pipeline

 
 
 

7.2.2   Detailed Engineering

 
 

7.3    Initial Workspace Setup

 
 
 

7.3.1   Organizing the Directory Structure

 
 

7.4    Dynamic Configurations and Provisioners

 

7.4.1   For-Each vs. Count

 
 
 

7.4.2   Executing Scripts with Provisioners

 
 
 
 

7.4.3   Null Resource with a Local-Exec Provisioner

 
 

7.4.4   Dealing with Repeating Configuration Blocks

 

7.4.5   Dynamic Blocks: Rare Boys

 
 
 

7.5    Configuring a Serverless Container

 
 

7.6    Deploying Static Infrastructure

 
 

7.7    CI/CD of a Docker Container

 
 
 
 

7.7.1   Kick Off CI/CD Pipeline

 
 

7.8    Fireside Chat

 
 

7.9    Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest