"Getting Started with Linux" Sonarqube and Jenkins Integration path __linux

Source: Internet
Author: User

After installing the sonar, you need to integrate with the Jenkins that the project is in, and the principle of Jenkins and sonar integration is probably this, Jenkins in its plug-in Management center, download the sonar plug-in and configure it with the sonar connection. Jenkins then notifies sonar of the operation of the source code analysis once the integrated build is completed. We all know Jenkins in the process of construction is to download from the SVN source this step of the operation, and Sonar is the Jenkins download good source code for the interpretation of the quality of the codes and other parameters to the graphical display of the page to the user.

Here's how Jenkins and sonar integrate and coordinate their work.

Plug-in installation

1. Online Installation:

Select Jenkins System Management-> Management plug-in-> optional plug-in bar, search Sonarqube Plugin, click to install directly.

However, this online installation generally does not work, because to access Google for downloading.

So we use the off-line installation method.

2. Offline Installation:

①. First download Sonarqube plugin plugin: https://wiki.jenkins-ci.org/display/JENKINS/SonarQube+plugin, download is Sonar.hpi file.

②. Select Jenkins System Management-> Admin Plug-in-> advanced-> upload Plugin

Just download the plugin sonar.hpi, upload to Jenkins, and according to the prompts to restart Jenkins can be.

After rebooting to the plugin management-> installed-> to see if Sonarqube plugin exists

The previous diagram plug-in appears, indicating that the installation was successful.


Sonarqube plugin Configuration

Locate the System Management-> system settings->sonarqube Bar, and make the following settings.


Conduct a project analysis

Select a project that can be successfully built and modify its configuration.

Increase the build after the operation step->sonarqube can.

When you add a configuration, the item's page appears with a Sonarqube flag

Then click Build immediately, after the build is complete, Jenkins will notify sonar to conduct code quality analysis, login sonar view


has been more than the configuration of the project, so we can easily go to the code to check, analyze the quality of the code. We have come a step further from the automation environment.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.