DEV Community

Azmat Ahmed
Azmat Ahmed

Posted on

πŸš€ End-to-End CI/CD Pipeline with Jenkins, Docker, Kubernetes & Argo CD (GitOps)

In this post, I’ll walk you through a real-world CI/CD pipeline using modern DevOps tools.
This project demonstrates how Continuous Integration and GitOps-based Continuous Deployment work together in production environments.

πŸ”— Source Code Repository
πŸ‘‰ https://github.com/Azmat-Ahmed/E-Commerce-Style-App

🧠 What This Project Covers

This project implements a complete CI/CD workflow:

Node.js E-commerce style web application

Jenkins for Continuous Integration (CI)

Docker for containerization

Docker Hub as image registry

Kubernetes for orchestration

Argo CD for GitOps-based Continuous Deployment (CD)

Separate Git repositories for source code and Kubernetes manifests

πŸ— Project Architecture (High Level)
Developer β†’ GitHub (Source Repo)
β†’ Jenkins (CI Pipeline)
β†’ Docker Build & Push
β†’ Docker Hub
β†’ Argo CD Image Updater
β†’ GitHub (Manifest Repo)
β†’ Argo CD
β†’ Kubernetes Cluster

πŸ“¦ Application Overview

The application is a Node.js Express web app with:

A clean, professional frontend

Navigation bar and product cards

Backend API serving product data

The app runs on port 3000 and is fully containerized using Docker.

πŸ” Why Two Git Repositories?
1️⃣ Source Code Repository

This repo contains:

Node.js application code

Frontend assets

Dockerfile

Jenkinsfile

πŸ‘‰ This repo is responsible for CI (build, test, image creation).

πŸ”— Source Repo:
https://github.com/Azmat-Ahmed/E-Commerce-Style-App

2️⃣ Kubernetes Manifest Repository

This repo contains:

deployment.yaml

service.yaml

ingress.yaml

πŸ‘‰ This repo defines what runs in Kubernetes.
Argo CD continuously watches this repository.

This separation follows the GitOps principle:

Git is the single source of truth for deployments.

βš™οΈ CI: Jenkins Pipeline

Whenever code is pushed to GitHub:

GitHub Webhook triggers Jenkins

Jenkins pipeline runs:

Code checkout

Docker image build

Docker image push to Docker Hub

Jenkins stops if any step fails

This ensures only valid, buildable code moves forward.

🐳 Docker Image Strategy

Each Jenkins build creates a new Docker image tag (e.g. build number or version).

Example:

azmatahmed/devops-shop:12

This image is pushed to Docker Hub and becomes available for deployment.

πŸ”„ CD with Argo CD & Image Updater (GitOps)
Argo CD Image Updater

Monitors Docker Hub for new image tags

Automatically updates the image tag in the Kubernetes manifest repo

Commits the change back to Git

Argo CD

Watches the manifest repository

Detects changes in YAML files

Automatically syncs Kubernetes cluster state with Git

⚠️ Jenkins does not deploy directly to Kubernetes
Deployment happens only via Git changes.

This is modern GitOps CD.

☸ Kubernetes Deployment

The Kubernetes setup includes:

Deployment: runs multiple replicas of the app

Service: exposes the app internally

Ingress: routes external traffic to the service

Once Argo CD syncs:

New pods are created

Old pods are terminated

Zero-downtime rolling update occurs

βœ… Benefits of This Approach

Clear separation of CI and CD

No direct cluster access from Jenkins

Full deployment history in Git

Easy rollback using Git revert

Production-ready GitOps workflow

🎯 Final Thoughts

This project represents how CI/CD is implemented in modern DevOps teams:

Jenkins focuses on building and testing

Docker ensures consistency

Kubernetes manages scalability

Argo CD provides safe, auditable deployments

If you’re learning DevOps, mastering this flow will give you a strong industry-level foundation.

πŸ”— Useful Links

Source Code Repo:
https://github.com/Azmat-Ahmed/E-Commerce-Style-App

Top comments (0)