- JDK 1.8 or later
- Maven 3 or later
- MySQL 5.6 or later
- Spring MVC
- Spring Security
- Spring Data JPA
- Maven
- JSP
- Sonarqube (ubuntu 18.04 | port 9000)
- Nexus (centos7 | port 8081)
- Sonarqube scanner
- maven
- Maven pipeline configuration
- Slack Notification
- Nexus
Architecture:

- Go to global configuration and set the sonarqube scanner.
- Save settings.

- Now go to configure settings and configure the sonarqube server.
- Generate token from Sonarqube site and paste it in configure.

- Use Chechstyle branch and my repo link.
- Create a new item and select pipeline.
- paste the above Jenkinsfile and change the tools name accordingly
- Build the job now.

- Use sonar_analysis branch and my repo link.
- Create a new item and select pipeline.
- Paste the above Jenkinsfile and change the tools name accordingly
- Build the job now.
- This is server name in jenkins for sonarqube.
withSonarQubeEnv('sonar_server')

- Bugs: 60
- Go to project in sonarqube -> project settings -> quality gate -> select the created quality gate.
- Now go to sonarqube -> project settings -> webhooks -> create webhook.
http://<jenkins-IP>:8080/sonarqube-webhook
- Now checkout the quailty-gate branch and use the jenkinfile as pipeline code and paste it in jenkins
- BUILD NOW

- Build success because the actual bugs is less than < 60

- Go to nexus server -> repository -> maven2(hosted)
- Create a repo in nexus.
- Go to manage config in jenkins change the ip of jenkins and sonarqube to private ips
- Save it
- Now go to manage credentials create a credential for nexus.
- Build NOW

- Nexus browse page

- Create account in
https://slack.com
- Create Workspace and channel in slack.
- Go to apps in slack and search for jenkinsCI.
- Copy the secret key.
- Now go to jenkins manage configure and add the secret key.
- Add pipeline code now

#DockerCI
- Create IAM user in aws.
- Add the aws credentials to jenkins