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
Git
Github
Jenkins
SonarQube
AWS EC2
Java open-jdk 11
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
Install sonarqube scanner plugins
go to manage Jenkins > manage plugins > search for plugins > install without restart
Stage-03: Install Postgre Database and Install SonarQube
Create a Project Manually
Give a name to your project, Project key then click on setup
Click on other ci and generate a token
Copy that token and save it somewhere because we need this token later.
Stage-04: Configure Jenkins
go to manage Jenkins> Manage Credentials > system > Add credentials > secret text file > paste the token we create in sonarqube and save and apply.
go to manage Jenkins > Global tool configuration > Add Maven and SonarQube Scanner
go to manage Jenkins > Configure System > Add SonarQube Server
Stage-05: Create a Pipeline Job in Jenkins
go to new item > enter item name > Pipeline > ok
go to pipeline and create your pipeline script and save and apply
Click on Build now to build your job
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: