/jenkins_sonarqube_basic_project

DevSecOps Project using git, GitHub, Jenkins and sonarqube

Primary LanguageJava

DevSecOps project using Git, GitHub, Jenkins and SonarQube

An end to end CI-CD projects implementing DevSecOps principles

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

*Follow this project *

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 pulgins > search for plugins > install without restart

Stage-03 : Install Postgre Database and Install SonarQube

  1. Create a Project Manually
  2. Give name to your project , Project key then click on setup
  3. Click on other ci and generate token
  4. Copy that token and save 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 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 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: