Integrating Jenkins with SonarQube
SonarQube, previously known as Sonar, is a rapidly application for reporting quality metrics and finding code hotspots. This recipe details how to generate code metrics through a Jenkins plugin, and then push them directly to a Sonar database.
Getting ready...
- Go to the Jenkins dashboard and click on
Manage Jenkins
. Go toManage Plugins
and in theAvailable
tab find the SonarQube plugin.
- Click on
Install without restart
:

- Go to the Jenkins dashboard and click on
Manage Jenkins
. - Click on
Configure system
and find theSonarQube
section. - Now, let's go to SonarQube to get the token to integrate Jenkins and SonarQube.
- Once SonarQube is up and running, open the browser at
http://localhost:9000
to visit the SonarQube dashboard:

- Click on
Login
and give the default username and password asadmin
anddefault
to log in as an administrator. - Click on
Login
:

- As of now, there is no project available in the SonarQube dashboard.
- Click on the
Administration
tab and in theSecurity
...