Thursday, February 14, 2019

How to integrate SonarQube and Jenkins - Jenkins SonarQube integration

Here below are the steps for integrating SonarQube with Jenkins:
Pre-requisites: 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 administration, security, users, click on Tokens, under generate token. Give some value for token name and click on generate. Copy the token.










2. After installing SonarQube successfully, login to Jenkins. Manage Jenkins --> Configure System --> SonarQube installation







Enter name, URL as http://localhost:9000, paste the token you copied from step #1
3. Click on Enable injection of Sonarqube server configuration.
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

Top 10 DevOps Popular Tools | Popular DevOps Tools You Must Know In 2025 | Learn DevOps Tools in 2025

Here are the top 10 DevOps Tools to focus on to put your DevOps learning on a  faster track  and kick start your career quickly as a success...