Skip to content

ameda71/mvnsonardoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8fe314c Β· Apr 23, 2025

History

69 Commits
Feb 28, 2025
Feb 28, 2025
Apr 22, 2025
Apr 22, 2025
Apr 23, 2025
Apr 23, 2025
Apr 23, 2025
Feb 28, 2025
Feb 28, 2025

Repository files navigation

Maven + SonarQube + Docker + GCP Kubernetes CI/CD Pipeline πŸš€

This project demonstrates a complete CI/CD pipeline using Jenkins, Maven, SonarQube, Docker, Docker Hub, and Google Kubernetes Engine (GKE). It automates building a Java application, performing code quality checks, containerizing it, and deploying it to a Kubernetes cluster on GCP.


πŸ”§ Tech Stack

  • Java + Maven β€” Application build and dependency management
  • SonarQube β€” Code quality analysis
  • Jenkins β€” Orchestration of the pipeline
  • Docker β€” Containerization of the application
  • Docker Hub β€” Container registry to store and pull images
  • GCP (GKE) β€” Kubernetes cluster for deployment
  • Terraform (optional) β€” Infrastructure provisioning for GKE

** CI/CD Workflow**

Jenkinsfile Highlights:

  1. Clone Git Repo

  2. Build with Maven

  3. Run SonarQube Analysis

  4. Build Docker Image

  5. Push to Docker Hub

  6. Authenticate to GCP

  7. Update Kubernetes Deployment YAML

  8. Deploy to GKE


πŸ” Jenkins Credentials Required

Make sure you have the following credentials set up in Jenkins:

sonar-token β€” SonarQube access token

docker-hub β€” Docker Hub username and password

gcp-key β€” GCP service account key file

How to Trigger the Pipeline

You can trigger the Jenkins pipeline either manually or via webhook on commit.

🎯 Outcome

Automatically builds your Java app

Runs SonarQube analysis for quality checks

Pushes production-ready Docker image to Docker Hub

Deploys the container on GKE via kubectl apply


πŸ› οΈ Improvements (Future Scope)

Add Quality Gate check stage for SonarQube

Add Slack notifications for success/failure

Use Helm instead of raw YAML for Kubernetes

Integrate Terraform fully for infra provisioning


Built with ❀️ using Jenkins, Docker, and Kubernetes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published