DevOps project using Git, GitHub, Jenkins, and SonarQube

DevOps project using Git, GitHub, Jenkins, and SonarQube

An end-to-end CI-CD project implementing DevOps principles

In this project, we will see how to use Git, GitHub, Jenkins, SonarQube, and DEPLOY on an AWS EC2.,

Prerequisites

  1. Git

  2. Github

  3. Jenkins

  4. SonarQube

  5. AWS EC2

  6. Java open-jdk 11

  7. Maven

Stage-01: Install JDK and Create a Java Springboot application

Push all the web application page code file into GitHub

Stage-02: Install Jenkins and start Jenkins

  1. Install sonarqube scanner plugins

  2. go to manage Jenkins > manage plugins > search for plugins > install without restart

Stage-03: Install Postgre Database and Install SonarQube

  1. Create a Project Manually

  2. Give a name to your project, Project key then click on setup

  3. Click on other ci and generate a token

  4. Copy that token and save it somewhere because we need this token later.

Stage-04: Configure Jenkins

  1. go to manage Jenkins> Manage Credentials > system > Add credentials > secret text file > paste the token we create in sonarqube and save and apply.

  2. go to manage Jenkins > Global tool configuration > Add Maven and SonarQube Scanner

  3. go to manage Jenkins > Configure System > Add SonarQube Server

Stage-05: Create a Pipeline Job in Jenkins

  1. go to new item > enter item name > Pipeline > ok

  2. go to pipeline and create your pipeline script and save and apply

  3. Click on Build now to build your job

  4. to see the output of the build, click on build > console output

Final output :

Jenkins Output :

You can find your jar file build by maven at /var/lib/jenkins/workspace/devopscicd/target/ this location

Sonarqube Output:

Jar file Deploy Output: