How to Integrate SonarQube with Jenkins | Jenkins SonarQube Integration
Here below are the steps for integrating SonarQube with Jenkins:
2. After installing SonarQube successfu lly, login to Jenkins. Manage Jenkins --> Configure System --> SonarQube installation
3. Click on Enable injection of Sonarqube server configuration check box.
Enter name as SonarQube,
URL as http://your_sonarqube_public_dns:9000,
paste the token you copied from step #1 by click on Add Credentials, choose Secret Text as dropdown, paste the token as token
Note: If the Add credentials button doesnt work, click save and try again.
4. Save.
5. Click on your existing free style job, click on configure. click on prepare Sonarqube scanner environment.
6. enter maven goal as clean install sonar:sonar
7. click on save and build the job.
You will see that Jenkins will integrate with Sonarqube which does code analysis of your project.
Login to SonarQube, click on Projects to see the project dash board.
Pre-requisites:
Make sure SonarQube is up and running and do the below steps:
Make sure SonarQube is up and running and do the below steps:
Make sure Sonarqube plug-in installed in Jenkins
1. You need to login to SonarQube using admin/admin and click on Admin on your top side.
Click on My Account, Security.
1. You need to login to SonarQube using admin/admin and click on Admin on your top side.
Under Tokens, Give some value for token name and click on generate Tokens. Copy the token.
2. After installing SonarQube successfu
3. Click on Enable injection of Sonarqube server configuration check box.
Enter name as SonarQube,
URL as http://your_sonarqube_public_dns:9000,
paste the token you copied from step #1 by click on Add Credentials, choose Secret Text as dropdown, paste the token as token
Note: If the Add credentials button doesnt work, click save and try again.
4. Save.
5. Click on your existing free style job, click on configure. click on prepare Sonarqube scanner environment.
6. enter maven goal as clean install sonar:sonar
7. click on save and build the job.
You will see that Jenkins will integrate with Sonarqube which does code analysis of your project.
Login to SonarQube, click on Projects to see the project dash board.
No comments:
Post a Comment