Thursday, March 1, 2018

How to integrate SonarQube with Jenkins?

Here below are the steps for integrating SonarQube with Jenkins:
1. Make sure SonarQube is up and running and do the below steps.
2. Also make sure to install the sonarqube plug-in in Jenkins.

1. You need to login to SonarQube using admin/admin(default username/password) or login as your administrator credentials.

2. Click on administration, security, users, click on Tokens, under generate token. Give some value for token name and click on generate. 
3. Copy the value of token.
4. Now login to Jenkins. Manage Jenkins --> Configure System --> SonarQube installation
enter some name such as SonarQube_server, SonarQube URL, paste the token value from step # 3
5. Click on Enable injection of Sonarqube server configuration.
6. Save.
7. Click on free style job configuration. click on prepare sonarqube scanner  environment
8. enter maven goal as clean install sonar:sonar
9. click on save and build the job.

No comments:

Post a Comment