Sonarqube scanner integrated into Jenkins
SonarQube build (docker way)
Jenkins integrates SonarScanner
One, install the plug-in
1. Install the scanner plugin in jenkins
The installed plug-in is shown in the figure
2. Configure SonarQube Service
2.1 Obtain token from SonarQube server
User > My Account > Security
Corresponding screenshots of the official website
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
(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
Two, use in the maven project
See the analysis of the three maven projects of the sonar series for details