Integrate SonarQube
SonarQube feature has been integrated since ZenTao 16.3.
You can add and maintain SonarQube servers, create SonarQube build tasks, and view SonarQube scan reports in ZenTao.
We will introduce the features of SonarQube in detail below.
1. Assign SonarQube privilege
Go to Admin--Member--Privilege to assign SonarQube privilege.
2. Maintain SonarQube server
2.1 Create SonarQube server
Click on the "Create SonarQube" button in the top right corner of the SonarQube page.
When creating a SonarQube server, the Server Name and Server Address are double-checked and the completed user credentials are verified to be correct.
The SonarQube server list includes ID, Server Name, and Server Address. Action buttons include SonarQube Project List, Edit SonarQube, and Delete SonarQube.
ID, Server Name, and Server Address can be sorted.
2.2 Edit SonarQube
Click on the ''Edit SonarQube'' button.
When editing a SonarQube server, the Server Name and Server Address are double-checked and the completed user credentials are verified to be correct.
2.3 Delete SonarQube
Click on the ''Delete SonarQube'' button.
Pop-up window.
Click YES to delete it.
3. View the SonarQube project
Click on the ''SonarQube Project List'' button.
Project Key, Project Name, and Last analysis time can be sorted.
Click on the "Back" button to go to the SonarQube server list page.
Enter the project information and click on the "Search" button to search and view the project.
Click on the ''Delete SonarQube Project'' button.
Pop-up window.
Click YES to delete it.
4. Compile and create a job, view the check result
Go to Compile to create a job:
- Engine: Jenkins
- Frame: SonarQube
- SonarQube Server: Select the corresponding SonarQube server from the drop-down menu
- SonarQube Project: Select the SonarQube project to be associated with from the drop down menu
- Only one build can be associated with the same code base or SonarQube project
Execute SonarQube build tasks in the SonarQube project list page:
If the project is already associated with a SonarQube build task, then the "Exec SonarQube Job" button is displayed in the Action bar, and the corresponding SonarQube build task is executed when the button is clicked.
Execute SonarQube build tasks in Repo:
If the repository is associated with a SonarQube build task, then the "Exec SonarQube Job" button is displayed in the Action bar, and the corresponding SonarQube build task is executed when the button is clicked.
View SonarQube code check results:
The "SonarQube Report" button is displayed on the Repo list page when a SonarQube build is associated with a codebase and the build has been successfully executed to generate a SonarQube check report.
Click on the "SonarQube Report" button to view the results of the test.