DevOps & Kubernetes (50 Qs)•Part 4: CI/CD Pipelines, GitOps & Progressive Delivery (36 - 42)
CI vs. CD vs. Continuous Deployment: Core principles, Trunk-Based Development, and deployment gates.
Delivery Pipeline Paradigms
The journey from code commit to running production software consists of three distinct stages of automation maturity.
sql
+------------------+ +-----------------------+ +-----------------------------+
| Continuous | | Continuous | | Continuous |
| Integration | | Delivery | | Deployment |
| | | | | |
| Commit -> Build | --> | Artifact Staged & | --> | Fully automated rollout |
| Lint -> Test | | Deployed to Staging; | | to Production with zero |
| (Fast Feedback) | | Manual Approval to Prod| | manual human intervention |
+------------------+ +-----------------------+ +-----------------------------+
Key Comparisons
| Stage | Automation Boundary | Human Gate | Primary Goal |
|---|---|---|---|
| Continuous Integration (CI) | Code → Test → Package | None | Detect integration conflicts, syntax bugs, and regressions within 5–10 minutes. |
| Continuous Delivery (CD) | Package → Staging Deployment | Manual button click to deploy to Production. | Maintain a deployable, release-ready artifact at all times. |
| Continuous Deployment | Commit → Production Deployment | Zero human gates. Automated tests and health gates dictate release. | Minimize lead time to change (minutes from commit to live user traffic). |
Trunk-Based Development vs. Long-Lived Feature Branches
High-performing engineering teams avoid merge hell by adopting Trunk-Based Development:
- Developers commit small, incremental changes directly to
maindaily (or use short-lived branches lasting $< 24$ hours). - Unfinished features are hidden behind Feature Flags (LaunchDarkly, Unleash) rather than isolated in divergent branches.