Skip to content

Optimized CI/CD pipeline for a Java Maven application using Jenkins, Docker, SonarQube, Argo CD, Helm, and Kubernetes

Notifications You must be signed in to change notification settings

Saurabhkr952/counter-app-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamline Your Java Maven Application Deployment with this Ultimate CI/CD Pipeline using Jenkins, Docker, SonarQube, Argo CD, Helm and Kubernetes

ultimate cicd pipeline

Jenkins configured with Docker as a slave

jenkins-slave

MY-PROJECT CI/CD PIPELINE

25

Here are the step-by-step details:

For Installing Jenkins & Configuring Docker as agent: https://github.com/iam-veeramalla/Jenkins-Zero-To-Hero

Install Required Plugins:

  • Docker Pipeline
  • Slack Notification
  • SonarQube Scanner

Setting Up SonarQube

  1. Install Docker on your EC2 instance. ( Don't forget to reboot your EC2)
  2. Enable inbound rule 9000 in your EC2 security group.
  3. Create a directory named "sonarqube" in your home directory.
mkdir sh
  1. Run the following command to start the SonarQube server:
sudo docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 -v ~/sonarqube-data:/opt/sonarqube/data sonarqube
  1. Fetch the SonarQube token and add it to Jenkins credentials as a secret text.
If you need help then checkout this video.I've added timestamp : https://youtu.be/KsTMy0920go?t=191
  1. Add the SonarQube server to Jenkins by navigating to "Manage Jenkins" > "System" > "SonarQube Servers" and entering the server name, server URL, and authentication token. '

Setting Up DockerHub

  1. Add the DockerHub username and password as secret text in Jenkins credentials.

  2. Set the ID same as {docker-hub-repo} in the Jenkinsfile.

docker hub credential

Setting Up GitHub

  1. Generate a Personal Access Token (PAT) from your GitHub account at https://github.com/settings/tokens.
  2. Add the GitHub username and PAT as secret text in Jenkins credentials.
  3. Set the ID same as {github-credentials} in the Jenkinsfile.

Setting Up Slack

  1. Create a Slack account and workspace.
  2. Navigate to https://plugins.jenkins.io/slack/ and select the "any" channel from your workspace to get the token.
  3. Add the Slack token as secret text in Jenkins credentials.
  4. Now go to Dashboard > Manage Jenkins > System and search for Slack and configure it.

slack

22

Congratulations! You have successfully set up Jenkins and Docker for slave configuration.

About

Optimized CI/CD pipeline for a Java Maven application using Jenkins, Docker, SonarQube, Argo CD, Helm, and Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published