Use cockpit to search and download sonar image directly in the Linux container and start the container

The configured port is 9001

1. Open the background of Sonar, and the default account and password are admin. 2. Reset the password after login. 3. After successful login, click [Configuration] -> [Permissions] -> [User] to view user [token].

2. Jenkins configuration

1. Install manage Jenkins -> Manage Plugins search sonarqube and install 2. Sonarqube configure System Find sonarqube, a. A name, b. input Server URL: c. Add a credential and select the credential to be added d. Save

3. Pre-build configuration in Jenkins project

sonar.projectKey=my: JOBNAME



sonar.projectName=JOB_NAME Sonar. ProjectVersion =1.0.0.${BUILD_NUMBER} Sonar.

At this point you are ready to start building the project. After the successful construction, sonar background will have a project.

The Jenkins project uses sonarQube to complete code reviews before construction