Skip to content

Chapter 1 of 7

Foundations of CI/CD

Continuous Integration (CI) is a development practice where engineers frequently merge code changes into a shared repository — often multiple times per day. Each merge triggers an automated build and test process, surfacing integration problems within minutes rather than weeks. The core benefits include early bug detection, reduced merge conflicts, faster feedback loops, and a consistent build process across environments. CI is the foundation of any modern software delivery practice, and the disciplines that compose it — test automation, source control hygiene, and pipeline reliability — shape everything that follows.

Continuous Delivery extends CI by ensuring that every successful build is in a deployable state, ready to be released to production at any moment, while still keeping a human approval checkpoint before the actual promotion. Continuous Deployment goes one step further: every change that passes all stages of the pipeline is automatically deployed to production with no human in the loop. The distinction comes down to a single decision gate: delivery keeps a deliberate, manual checkpoint before production, whereas deployment removes it entirely. Choosing between them depends on risk tolerance, regulatory constraints, and the maturity of your automated tests.

A typical CI/CD pipeline moves work through a series of stages that turn source code into running software. The pipeline begins with a Source stage where the latest commit is checked out of version control; Build then compiles code and resolves dependencies. The Test stage runs unit, integration, and end-to-end automated checks. Static Analysis catches lint and code-quality issues, and Security Scan runs static analysis, dynamic analysis, and dependency vulnerability checks. Package produces a deployable artifact, Deploy pushes that artifact to staging or production, and Release makes it visible to end users. Each stage is an opportunity to fail fast — the build should collapse at the earliest, cheapest indicator of trouble.

Branching strategy determines the rhythm of merges that feed the pipeline. GitFlow is a structured model with multiple long-lived branches, including main, develop, feature, release, and hotfix; it works well for scheduled releases but can produce painful merge conflicts when branches live long. Trunk-based development is the opposite extreme: everyone commits to a single trunk at least daily, hides incomplete work behind feature flags, and leans on continuous integration to keep the mainline green. Feature branches sit between these poles: each piece of work is isolated in a dedicated branch that triggers automated builds and status checks, kept short-lived and rebased frequently. Modern CI/CD strongly favors trunk-based or very short-lived branches because they dramatically reduce merge risk.

All chapters
  1. 1Foundations of CI/CD
  2. 2GitHub Actions in Depth
  3. 3Jenkins and Alternative CI/CD Platforms
  4. 4Pipeline Internals, Caching, and Configuration
  5. 5Testing, Code Quality, and Security Scanning
  6. 6Deployment Strategies and Progressive Delivery
  7. 7Supply Chain Security and Engineering Excellence

Drill it

Reading is not remembering. These come from the Cicd Pipelines deck:

Q

What is Continuous Integration (CI)?

Continuous Integration is a development practice where developers frequently merge code changes into a shared repository, often multiple times a day. Each merge...

Q

What is the difference between Continuous Delivery and Continuous Deployment?

Continuous Delivery ensures code is always in a deployable state but requires a manual approval step before production release.Continuous Deployment goes furthe...

Q

What are the typical stages of a CI/CD pipeline?

A standard CI/CD pipeline includes these stages:Source – code checkout from version controlBuild – compile code and resolve dependenciesTest – run unit, integra...

Q

What is a GitHub Actions workflow?

A GitHub Actions workflow is an automated process defined in a YAML file under .github/workflows/. It is triggered by events such as push, pull_request, or sche...