Java App CI/CD + CD Architecture

GitHub source code → Jenkins CI → Docker Hub image registry → GitLab CD with GitLab Agent → Kubernetes deployment with Helm

This diagram shows the full project flow: Jenkins handles CI tasks and pushes the Java/Tomcat image to Docker Hub, then triggers GitLab, and GitLab deploys the selected image tag to the Kubernetes cluster using Helm through GitLab Agent.
🐙

GitHub

Source code repository for the Java web application inside my-java-app/.

Push / Commit
Webhook → Jenkins
🤵
Jenkins CI Pipeline
1. Checkout CodeGitHub repository
2. Maven Build & Testmvn clean test package
3. SonarQube ScanStatic code analysis
4. Quality GatePipeline waits for result
5. Build Docker ImageTomcat image with WAR file
6. Push to Docker HubVersion tag + latest tag
7. Trigger GitLab DeployPipeline Trigger API
🐳

Docker Hub

Stores the built container image for deployment.

ahmad09x/java-app:4
ahmad09x/java-app:latest

Produced by Jenkins

The CD pipeline deploys a specific image tag passed from Jenkins to GitLab.
🦊

GitLab CD Project

Dedicated deployment repository containing Helm chart files and GitLab CI/CD configuration.

Pipeline Trigger Token
.gitlab-ci.yml
Variables: KUBE_CONTEXT, DOCKER_IMAGE, IMAGE_TAG
Helm chart in helm/java-app/

Deployment Logic

GitLab receives the image tag from Jenkins, switches to the GitLab Agent Kubernetes context, and runs helm upgrade --install.
☸️

Kubernetes Cluster

Application is deployed through GitLab Agent and Helm into the target namespace.

GitLab Agent (java-agent)
Helm Deploy / Upgrade
LoadBalancer Service
Java App Pod
Java App Pod
Java App Pod