Day 12 - Introduction to CI/CD
Hi there! I'm Dinesh, a passionate Cloud and DevOps enthusiast. I love to dive into the latest new technologies and sharing my journey through blog.
Search for a command to run...
Hi there! I'm Dinesh, a passionate Cloud and DevOps enthusiast. I love to dive into the latest new technologies and sharing my journey through blog.
No comments yet. Be the first to comment.
1. Difference between Docker and Kubernetes Docker β Builds and runs containers.Kubernetes β Orchestrates containers across multiple nodes. Key points: Docker = container runtime. Kubernetes = container orchestration tool. Kubernetes provides auto...
In this session, we learn how to monitor a Kubernetes cluster using Prometheus and Grafana.This is not just theory β there is a GitHub repository containing all installation commands and demo steps.The repo will also be enhanced later with advanced K...
1. What is a ConfigMap in Kubernetes? A ConfigMap is used to store non-sensitive configuration data that your application needs β such as: Database port Connection type Any general configuration values In normal applications (non-Kubernetes), de...
Kubernetes normally supports built-in resources like: Deployment Service Pod ConfigMap Secret Ingress These are called native resources. Sometimes companies (Istio, ArgoCD, Prometheus Operator, Kyverno, etc.) want to add new features that Kub...
1. Why Kubernetes Services Are Needed When a Pod is created in Kubernetes, it receives a dynamic IP address.If the Pod dies and restarts, its IP changes.So other Pods (like checkout β payments) cannot rely on Pod IP because it changes, creating issue...
CI/CD stands for Continuous Integration and Continuous Delivery/Deployment.
It is a set of practices and automated processes that help teams build, test, and deliver software efficiently and reliably.
Before CI/CD, teams deployed applications manually β testing, scanning, and deploying took weeks or months.
With modern applications, users expect updates every few days or even hours, so companies must:
Deliver software quickly and safely
Ensure code quality and security
Reduce human effort and error
π CI/CD automates these steps.
Continuous Integration is the process of automatically building and testing code whenever developers make changes.
Code Commit: Developers push code to a Version Control System (VCS) such as GitHub, GitLab, or Bitbucket.
Build Process: The code is automatically compiled or built (e.g., using Maven for Java).
Unit Tests: Automated unit tests verify small pieces of functionality.
Static Code Analysis: Tools check for syntax errors, unused variables, and poor code practices (e.g., using SonarQube).
Code Quality & Security Scan: Tools detect vulnerabilities and ensure secure code.
β CI ensures that new code integrates smoothly with the existing codebase and remains stable.
After successful integration, the Continuous Delivery phase automates:
Functional / Integration Testing: Ensures new code doesnβt break other features.
Report Generation: Summarizes test results, code quality, and coverage.
Deployment: Pushes code to environments like Dev, Staging, or Production.
Continuous Deployment goes one step further β automatically deploying to production without manual approval.
A developer writes code locally (e.g., an addition feature in a calculator app).
After testing locally, they push the code to a Git repository.
A CI/CD tool (e.g., Jenkins, GitHub Actions, GitLab CI) detects the change.
The tool triggers a pipeline β a series of automated steps:
Build the code
Run tests (unit, functional)
Perform code analysis
Generate reports
Deploy to servers (Dev β Staging β Production)
| Category | Examples |
| Source Control | GitHub, GitLab, Bitbucket |
| CI/CD Orchestration | Jenkins, GitHub Actions, GitLab CI, CircleCI, Travis CI |
| Build Tools | Maven, Gradle |
| Testing Tools | JUnit, Selenium |
| Code Analysis | SonarQube |
| Deployment | Docker, Kubernetes, AWS, Azure, GCP |
Developer commits code β GitHub repository.
Jenkins detects the change (via webhook).
Jenkins runs a Pipeline consisting of:
Build (Maven)
Unit Tests (JUnit)
Code Quality (SonarQube)
Reporting (Allure)
Deployment (to Kubernetes, EC2, etc.)
Jenkins integrates all tools together.
Pipelines can be written in Groovy (Declarative or Scripted Pipeline syntax).
Used widely for years, but has scaling limitations.
| Environment | Purpose |
| Dev | For developers to test early builds |
| Staging | Replica of production; QA testing |
| Production | Final live environment for customers |
Pipelines promote code automatically:
Dev β Staging β Production
Using manual approvals or automated policies.
Requires manual setup of master and multiple worker nodes.
Scaling to handle hundreds of microservices becomes complex and expensive.
Continuous usage of compute resources (RAM/CPU), even when idle.
Difficult to achieve zero-resource usage when pipelines are inactive.
Modern applications (like Kubernetes, Amazon, Flipkart) handle hundreds or thousands of microservices β they need scalable, on-demand CI/CD systems.
Uses GitHub Actions for automation.
When a developer makes a pull request, a workflow runs automatically.
Containers (pods) are created temporarily to execute build/test steps.
After completion, the containers auto-delete β no wasted resources.
β Benefits:
Zero compute waste when idle
Shared runners for multiple projects
Fast scaling (pods start instantly)
Event-driven automation (no manual trigger)
| Tool | Platform | Key Features |
| GitHub Actions | GitHub | Event-driven, scalable, integrated with repositories |
| GitLab CI | GitLab | Built-in pipelines, YAML-based |
| CircleCI | Cloud | Simple config, fast builds |
| Travis CI | Cloud | Great for open-source projects |
| Argo CD / Tekton | Kubernetes-native | Cloud-native CI/CD pipelines |
| Feature | Jenkins | GitHub Actions |
| Type | Standalone Orchestrator | Cloud/Repo-integrated |
| Setup | Manual installation & configuration | Built into GitHub |
| Scalability | Manual node scaling | Auto containerized runners |
| Cost | Compute always running | Pay-per-use (zero idle cost) |
| Triggers | Webhooks | Event-driven natively |
| Ideal For | On-prem & traditional projects | Cloud-native, modern apps |
| Concept | Description |
| CI/CD | Automates integration, testing, and deployment |
| Continuous Integration | Merges code frequently, runs builds/tests automatically |
| Continuous Delivery | Deploys to environments automatically after testing |
| Tools | Jenkins, GitHub Actions, GitLab CI, CircleCI |
| Modern Trend | Cloud-native, event-driven, container-based pipelines |
| Goal | Faster releases, fewer errors, and efficient resource use |
β In short:
CI/CD automates how your code goes from a developerβs laptop β through build, test, and security checks β to production servers β ensuring every release is fast, reliable, and safe.