Volume 9 · Chapter 1 — CI/CD, DevOps and Infrastructure as Code
CI/CD Fundamentals
1.1 Introduction
How software gets from a developer’s change to running in production - reliably, quickly, and safely - is the domain of CI/CD and DevOps. For a bank deploying to critical systems, the pipeline that builds, tests, and releases software is itself a piece of production infrastructure that must be trustworthy and auditable. This chapter establishes the fundamentals: what continuous integration and continuous delivery/deployment mean, why they matter, and how the pipeline connects to the safe-deployment and reliability practices from earlier volumes.
1.2 What CI/CD Means
CI/CD is really two connected practices. Continuous Integration (CI) is the practice of frequently merging code changes into a shared repository, where each change automatically triggers a build and a suite of automated tests - so integration problems and bugs are caught early, on every change, rather than accumulating. Continuous Delivery (CD) extends this so that code which passes all the automated checks is automatically prepared for release and can be deployed to production at any time with a push of a button; Continuous Deployment goes one step further and deploys every passing change to production automatically. The essence is automating the path from code change to production so it’s fast, repeatable, and reliable, with automated quality gates ensuring only good changes proceed.
1.3 Why CI/CD Matters
Manual build and release processes are slow, error-prone, and inconsistent - someone forgets a step, the build differs between environments, releases are risky rare events. CI/CD replaces this with automation that makes releases fast, frequent, and low-risk. The benefits compound: catching bugs early (every change is built and tested automatically) is far cheaper than finding them in production; frequent small releases are less risky than infrequent large ones because each change is small and easy to diagnose and roll back; and automation removes human error and makes the process consistent and repeatable. Crucially, frequent deployment and safe deployment reinforce each other - the safe-deployment strategies from the last volume let you deploy often without fear, and deploying often keeps each change small and safe.
flowchart LR Dev[Developer commits] --> CI[CI: build + automated tests + quality gates] CI -->|pass| Artifact[Immutable versioned artifact] CI -->|fail| Stop[Stop - fix before proceeding] Artifact --> CD[CD: deploy to staging -> prod\nsafely, with approvals/gates] CD --> Prod[(Production)]
1.4 The Pipeline
A CI/CD pipeline is the automated sequence a change flows through from commit to production. A typical pipeline: a developer commits code; the pipeline automatically builds it and runs automated tests (unit, integration) and quality checks; if all pass, it produces a versioned artifact (a container image or package); then it deploys that artifact through environments - to staging for further testing, and to production - using safe-deployment strategies, sometimes with a manual approval gate before production. Each stage gates the next, so a change only progresses if it passes the checks at each step. The pipeline is defined as code and version-controlled itself, making it repeatable and auditable - which for a bank is essential.
1.5 DevOps Culture
CI/CD is the technical core of DevOps, which is broader - a culture and set of practices that bring development and operations together to deliver software faster and more reliably. DevOps emphasizes automation (of building, testing, deploying, and infrastructure), shared ownership (teams that build software also run it, closing the feedback loop), and continuous improvement. The cultural shift is away from developers “throwing code over the wall” to operations, toward teams owning their software end-to-end with the automation to deploy and operate it safely. CI/CD, infrastructure as code, observability, and the reliability practices from earlier volumes are all expressions of this culture - automate the path to production, own what you run, and improve continuously.
1.6 Banking Production Scenario
A bank builds every service through a defined CI/CD pipeline. A developer’s commit automatically triggers a build and a full suite of automated tests and quality and security checks; only if all pass does the pipeline produce a versioned, immutable artifact. That artifact is deployed automatically to a staging environment for further testing, and then - after a required approval for production changes - to production using a canary strategy gated on health. The pipeline is defined as code, version-controlled, and produces a complete audit trail of what was built, tested, and deployed when and by whom. Because releases are automated, small, and safe, the bank deploys frequently with low risk, catching problems early and rolling back fast - turning software delivery into a reliable, auditable, repeatable process rather than a risky manual event.
1.7 Troubleshooting: Delivery Weaknesses
Delivery problems trace to missing automation or gates. Bugs repeatedly reaching production mean the pipeline lacks sufficient automated testing and quality gates - add them so bad changes are caught before release. Risky, infrequent “big bang” releases mean changes aren’t being integrated and deployed frequently - move to small, frequent, automated releases. Inconsistent builds across environments mean the process isn’t fully automated and repeatable - define the pipeline as code and build artifacts once. Slow, manual releases full of human error mean the path to production isn’t automated - build a pipeline. No record of what was deployed when means the pipeline isn’t producing an audit trail - version-control it and log its actions. The remedy is automating the build-test-release path with quality gates, frequent small releases, and an auditable pipeline defined as code.
What are CI and CD, and why does CI/CD matter?
CI and CD are two connected practices for automating the path from a code change to running software. Continuous Integration is the practice of frequently merging code changes into a shared repository, where each change automatically triggers a build and a suite of automated tests, so integration problems and bugs are caught early on every change rather than accumulating until a painful big integration later. Continuous Delivery extends this so that code which passes all the automated checks is automatically prepared for release and can be deployed to production at any time with the push of a button, keeping the software always in a releasable state; Continuous Deployment goes further and automatically deploys every passing change to production. The essence is automating the journey from commit to production so it’s fast, repeatable, and reliable, with automated quality gates ensuring only good changes proceed. Why it matters is that the alternative - manual build and release - is slow, error-prone, and inconsistent: someone forgets a step, builds differ between environments, and releases become risky, rare events people dread. CI/CD replaces that with automation whose benefits compound. Catching bugs early is far cheaper than finding them in production, and CI catches them on every change by building and testing automatically. Frequent small releases are much less risky than infrequent large ones, because each change is small, easy to understand, easy to diagnose if something goes wrong, and easy to roll back - whereas a big release bundles many changes and makes any failure hard to isolate. Automation removes human error and makes the whole process consistent and repeatable, and defining the pipeline as code makes it version-controlled and auditable, which matters enormously for a regulated bank that must demonstrate control over what reaches production. Importantly, frequent deployment and safe deployment reinforce each other: the safe-deployment strategies like canary and blue-green let you deploy often without fear, and deploying often keeps each change small and therefore safe - a virtuous cycle. CI/CD is also the technical core of DevOps, the broader culture of bringing development and operations together with automation and shared ownership so teams build and run their software end-to-end. So CI and CD are the automated build-test-and-release pipeline, and CI/CD matters because it catches bugs early, makes releases small, frequent, and low-risk, removes manual error, and produces a consistent, auditable, repeatable path to production - which is what lets a bank deliver software quickly while keeping the control and reliability its systems demand.
Chapter Revision Notes
- CI: frequently merge changes, each automatically built and tested, catching bugs early on every change.
- CD: passing changes are always releasable (Continuous Delivery) or auto-deployed (Continuous Deployment) - automating commit-to-production.
- Benefits: catch bugs early (cheaper), small frequent releases (lower risk, easy rollback), remove human error, consistent and auditable.
- The pipeline builds, tests/gates, produces a versioned artifact, and deploys through environments with safe-deployment strategies.
- CI/CD is the technical core of DevOps culture: automation, shared ownership (build and run), continuous improvement.