Sonarqube Series 2: Sonarqube scanner integrated into Jenkins


SonarQube build (docker way)

Detailed steps to build

Jenkins integrates SonarScanner

One, install the plug-in

1. Install the scanner plugin in jenkins

The installed plug-in is shown in the figure
Insert picture description here

2. Configure SonarQube Service

2.1 Obtain token from SonarQube server

User > My Account > Security

Corresponding screenshots of the official website
Insert picture description here

2.2 Configure SonarQube in jenkins

(1). Enter the jenkins management page, find the SonarQube configuration item
Manage Jenkins> Configure System> click Add SonarQube, as shown in Figure
Insert picture description here
(2). The token obtained by the configuration
needs to be added to the Credentials of Jenkins first, the steps are as follows;
click Add -> enter Credentials configuration page, fill in the token to save -> select the token just stored
Insert picture description here
Insert picture description here
Insert picture description here

Two, use in the maven project

See the analysis of the three maven projects of the sonar series for details

Guess you like

Origin blog.csdn.net/dabaoting/article/details/113886796