πCI/CD Demystified


π Continuous Integration (CI)
Goal: Catch bugs early during development.
π What it means:
Every time you or your team writes code and pushes to Git, automated tests, linters, and build scripts run automatically.
π§ͺ Includes:
Unit tests
Lint checks
Build checks
π οΈ Tools:
- GitHub Actions, Jenkins, CircleCI, GitLab CI
π¦ Example:
You push a login feature to GitHub β GitHub Actions runs tests β If everything passes, the code is ready for staging.
π Continuous Delivery (CD)
Goal: Always have a production-ready codebase.
π What it means:
After CI, your code can be manually deployed anytime β itβs always ready to ship.
β
Run tests not just on main
, but on every commit (feature branches too).
π οΈ Tools:
- Spinnaker, GitLab, ArgoCD, Flux
π¦ Example:
You fix a bug β GitHub Actions runs tests β code is merged to main
β a button in the dashboard lets the team deploy it to prod when ready.
π Continuous Deployment (CD)
Goal: Automatically deploy every successful commit to production β no human click needed.
π What it means:
Once code passes all tests + security checks β it's pushed live for users.
π§ͺ Still, thereβs risk of bugs (even with 99% test coverage), so smart deployment strategies are used:
Deployment Strategies
1. Canary Deployment
Rollout to a small subset of users (e.g., 5% β 10% β 50% β 100%)
π’ Safer β Easy to rollback if bugs detected
π¦ Example:
Your new UI is first shown to only 10% of users. You monitor errors & feedback. If itβs smooth, rollout increases.
π οΈ Tools:
- LaunchDarkly, Argo Rollouts, Istio, Flagger
2. Blue-Green Deployment
Two environments:
Blue = current version
Green = new version
π Users are gradually shifted from Blue β Green.
π§ͺ You test Green β Switch DNS/load balancer β Done!
π¦ Example:
New checkout flow is deployed to Green. You test it live while users are still on Blue. Once verified, you flip the switch.
π οΈ Tools:
- Kubernetes, NGINX, AWS CodeDeploy, Spinnaker
π― Final Real-World Flow
Developer pushes code β CI (GitHub Actions runs tests)
CD kicks in β Auto deploys to staging β Manual/Auto deploy to prod
Canary rollout begins β Monitored via dashboards
If smooth β 100% rollout
Issues? β Rollback or redirect traffic to older version (Blue)
Using Jenkins for CI/CD & Deployment
Jenkins is one of the most widely-used automation servers for CI/CD. Itβs open-source, highly customizable, and integrates with almost everything.
π οΈ Jenkins Pipeline Flow:
Letβs say you're deploying a new login feature:
π§± Step-by-step Jenkins Setup:
π§βπ» Developer pushes code to GitHub.
π§ͺ Jenkins Job (CI) triggers automatically:
Pulls code
Runs unit tests
Linting
Builds the app (maybe Docker image)
β If CI passes, Jenkins moves to CD pipeline:
Deploys to Staging server
Runs integration tests
Sends approval request (for Continuous Delivery) OR
Auto deploys to Production (for Continuous Deployment)
Tools Jenkins Works With:
GitHub/GitLab/Bitbucket β Code repo
Docker β Build & push images
Kubernetes β Container orchestration
ArgoCD/Spinnaker β Rollouts
Slack/Email β Notifications
SonarQube β Code quality check
Final Summary (CI/CD with Jenkins):
Stage | What Happens | Jenkins Role |
CI | Code pushed, tests & build run | Automates test & build pipeline |
CD | Ready code auto/manual deploys | Handles deployment to staging/prod |
Deployment Strategy | Canary/Blue-Green | Coordinates with tools like Argo, NGINX |
Thanks for reading!
Subscribe to my newsletter
Read articles from Abheeshta P directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Abheeshta P
Abheeshta P
I am a Full-stack dev turning ideas into sleek, functional experiences π. I am passionate about AI, intuitive UI/UX, and crafting user-friendly platforms . I am always curious β from building websites to diving into machine learning and under the hood workings β¨. Next.js, Node.js, MongoDB, and Tailwind are my daily tools. I am here to share dev experiments, lessons learned, and the occasional late-night code breakthroughs. Always evolving, always building.