This repository contains an exercise demonstrating a complete CI/CD workflow:
- Jenkinsfile that clones the code on a build server, builds a Docker image, uploads it to DockerHub, and then deploys the application as a Pod on a separate deploy server (Minikube).
- GitHub Actions (Sonar Cloud & Snyk) run automatically on every push to the developmentbranch, ensuring code quality and security checks.
- 
Jenkins Pipeline - Build: Clones GitHub repo, builds Docker image.
- Push: Uploads the new image to DockerHub (public repo).
- Deploy: Spins up a Pod in Minikube, exposes via port 443 using Nginx.
 
- 
Sonar Cloud & Snyk - Integrated into GitHub Actions.
- Automatically scans every push to the developmentbranch for code quality and security vulnerabilities.
 
- 
Server Details - server-1 (build-node-1): Ubuntu 24.04 with Docker installed (for building images).
- server-2 (deploy-node-1): Ubuntu 24.04 with Minikube (for hosting the application).
- Route 53: Domain name pointed to the deploy-node-1instance to allow external traffic over HTTPS.
 
- 
Code Commit & Test (GitHub Actions) - On push to development, Sonar Cloud checks for code quality; Snyk checks for vulnerabilities.
 
- On push to 
- 
Build (Jenkins) - Jenkins clones the GitHub repository on build-node-1.
- Docker image is built locally, tagged, and pushed to DockerHub.
 
- 
Deploy (Jenkins) - Jenkins connects to deploy-node-1 (Minikube).
- Pod is created using the newly pushed Docker image.
- Nginx is configured to serve traffic on port 443.
 
- 
Access (Public) - The application can be accessed via the domain configured in Route 53.
- Nginx handles SSL termination, so traffic is served securely.
 
- Jenkins installed (or containerized) with credentials for:
- GitHub (to pull code).
- DockerHub (to push images).
 
- Docker installed on the build server.
- Minikube installed on the deploy server.
- Nginx configured to expose traffic on port 443.
- Route 53 domain properly pointed to the deploy-node-1instance.
- Fork or Clone this repository into your own GitHub account.
- Configure Jenkins credentials for GitHub and DockerHub.
- Set Up server-1(Ubuntu with Docker) for building.
- Set Up server-2(Ubuntu with Minikube) for deployment.
- Update Jenkinsfile with your DockerHub repository name.
- Run the Jenkins pipeline:
- Checkout GitHub code.
- Build Docker image.
- Push image to DockerHub.
- Deploy to Minikube.
- Verify via a curl or browser test on https://<YOUR_DOMAIN>.
 
For a detailed, step-by-step explanation, check out this Medium article:
DevOps Example Project for Your Resume
This repository is provided as-is for educational purposes. Feel free to fork and modify it for your own learning or demonstrations.
Happy DevOps-ing!
