liveBook · Manning

Deployment pipeline

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

A delivery pipeline is an automated sequence of activities that validates, packages, and delivers software or infrastructure changes.

A deployment pipeline is an automated sequence that builds, tests, reviews, deploys, and releases infrastructure changes. It codifies the release process so teams apply changes consistently and reproducibly rather than relying on memory. section 7.1.1

A typical infrastructure pipeline moves through these stages:

  • Check configuration conflicts and syntax problems. section 7.1.1
  • Run unit tests for formatting and standards. section 7.1.1
  • Deploy to a testing environment and run integration and end-to-end tests. section 7.1.2
  • Pause for peer or organizational approval when a quality gate is required. section 7.0
  • Deploy or release the validated change to production. section 7.1.1

Continuous integration starts the workflow whenever a team member merges changes, helping identify conflicts early. Continuous delivery extends it by deploying to a test environment, running broader tests, and optionally waiting for manual approval before production. section 7.1.1 section 7.1.2

Pipelines also deliver infrastructure modules: test the module, review the results, then release a new version instead of deploying directly to production. Emergency fixes may use continuous deployment or an isolated branch. section 7.1.5

Treat pipeline credentials and sensitive variables as security boundaries. Use secrets managers, avoid administrative credentials where possible, and prevent passwords from appearing in logs. Stateful changes need idempotent migration steps that run alongside deployment and testing. section 8.1 section 9.3.2

Testing and releasing a service

A GitHub Actions pipeline for a service can run unit tests, deploy infrastructure to a testing environment, run integration and end-to-end tests, wait for approval, and deploy to Google Cloud Run. section 7.1.2

Figure 7.4 Continuous delivery automatically deploys and runs infrastructure changes in a testing environment and waits for manual approval for production.

Use the workflow figure to follow automated testing, testing-environment deployment, manual approval, and production release. section 7.1.2

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Explains pipeline stages, CI/CD variants, module releases, security controls, and idempotent migrations, but defers extensive migration practice.
Examples
Uses CI workflows, GitHub Actions with Google Cloud Run, module version releases, and blue-green database migration.
What it assumes
Assumes infrastructure as code, version control, unit testing, and peer review; teaches how to combine them into delivery workflows.
What you can do after
Apply via GitHub Actions a repeatable pipeline that tests infrastructure, gates releases, deploys environments, and migrates state safely.
How it connects
Connects continuous integration, continuous delivery, infrastructure as code, automated testing, peer review, secrets management, and data migration.

Also explained in

Compare how 30 books explain deployment pipeline →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.