This project demonstrates an end-to-end DevOps CI/CD pipeline for a Java Calculator application.
The application is built using Java, Maven, and JUnit. The complete DevOps workflow is automated using Jenkins. The pipeline includes source code management with GitHub, automated build and testing, SonarQube code quality analysis, Docker containerization, Render cloud deployment, and Kubernetes deployment using Docker Desktop.
The application is deployed on Render and can be accessed here:
- Java
- Maven
- JUnit
- GitHub
- Jenkins
- SonarQube
- Docker
- Render
- Kubernetes
- Docker Desktop
- kubectl
Developer pushes code to GitHub
↓
Jenkins pulls the latest code from GitHub
↓
Maven compiles the Java project
↓
JUnit test cases are executed
↓
SonarQube performs static code analysis
↓
Quality Gate is verified
↓
Docker image is built
↓
Application is deployed to Render
↓
Application is deployed to Kubernetes
↓
Deployment is verified using kubectl commands
- Java Calculator application
- Maven-based project structure
- Unit testing using JUnit
- Jenkins Pipeline from SCM
- Automated build, test, and package stages
- SonarQube static code analysis
- Quality Gate verification
- Docker image creation
- Render cloud deployment
- Kubernetes deployment using YAML files
- Kubernetes service exposure and verification using port-forwarding
GitHub
↓
Jenkins
↓
Maven Build
↓
JUnit Testing
↓
SonarQube Analysis
↓
Docker Image
↓
Render Deployment
↓
Kubernetes Deployment
The Jenkins pipeline automates the following stages:
- Checkout source code from GitHub
- Compile the Java project using Maven
- Run JUnit test cases
- Package the application
- Perform SonarQube analysis
- Verify SonarQube Quality Gate
- Build Docker image
- Deploy the application
- Verify deployment
The application is containerized using Docker. A Docker image is created from the Java application and used for deployment.
Common Docker commands used:
docker build -t java-calculator .
docker images
docker run -p 9090:9090 java-calculator
docker psThe application is deployed to Kubernetes using Docker Desktop Kubernetes.
Kubernetes resources used:
- Deployment
- Service
- Pod
- NodePort
- Port-forwarding
Kubernetes verification commands:
kubectl get nodes
kubectl get deployments
kubectl get pods
kubectl get svc
kubectl describe svc java-calculator-service
kubectl port-forward svc/java-calculator-service 9090:80The application was successfully verified using:
http://localhost:9090
The application is deployed on Render for cloud access. Render automatically builds and runs the application from the connected GitHub repository, making it available online without needing the local system to be running.
Live URL:
https://java-calculator-devops.onrender.com/
The Jenkins pipeline initially had a branch mismatch issue. It was fixed by using the correct branch configuration:
*/main
A duplicate Git clone stage was removed because Pipeline from SCM already checks out the repository automatically.
The SonarQube authentication issue was fixed by generating and using a proper SonarQube token in Jenkins.
kubectl was initially pointing to the wrong or inactive Kubernetes server. The context was verified using:
kubectl config current-contextDirect NodePort access was not working on localhost, so the application was verified using Kubernetes port-forwarding:
kubectl port-forward svc/java-calculator-service 9090:80Add project screenshots inside a folder named screenshots.
Recommended screenshots:
- Jenkins pipeline success
- SonarQube Quality Gate passed
- Docker container running
- Render deployment
- Kubernetes pods running
- Kubernetes service details
- Port-forward verification
- Application running locally
This project helped me understand the complete DevOps lifecycle, including:
- Source code management
- Build automation
- Unit testing
- Static code analysis
- Code quality gate verification
- Docker containerization
- Cloud deployment
- Kubernetes orchestration
- Service exposure
- Deployment verification
- Debugging real DevOps issues
This is an end-to-end DevOps CI/CD pipeline project for a Java Maven application. The source code is managed in GitHub, Jenkins automates the build and test process, SonarQube performs code quality analysis, Docker is used for containerization, Render is used for cloud deployment, and Kubernetes is used for container orchestration.
The Kubernetes deployment was verified using kubectl commands. The pods were running successfully, the service had valid endpoints, and the application was accessed locally using port-forwarding.
Built an end-to-end CI/CD pipeline for a Java Maven application using Jenkins, GitHub, JUnit, SonarQube, Docker, Render, and Kubernetes with automated build, test, code analysis, containerization, and deployment.
Likitha H K
B.Tech Computer Science Engineering
This project is developed for educational, research, and portfolio purposes.
