This is a plugin project for TCA integrating SonarQube.
- sonarqube-8.9.8.54436
- sonar-scanner-4.2.0.1873
- setup TCA;
- download this project;
- load the rules json in config diretory for TCA Server;
- On the node management page on the TCA Server, configure the SonarQube tool process for the machine node;
- Create the corresponding TCA project on the TCA Server, add the SonarQube rules to the analysis plan, and start the analysis.
need sonar-java-plugin-5.14.0.18788.jar
For languages like javascript/typescript/css, SonarQube requires the Node.js environment:
export PATH=${NODE_HOME}/bin:${PATH}
This project is divided into two operating modes, local mode and COMMON mode, the default local mode.
Start the SonarQube service locally, and then execute the analysis task.
Supports connecting to remote SonarQube services.
- In the setting.py file, configure the information of SQ_COMMON_USER following SQ_LOCAL_USER
- Set environment variables in the analysis scheme of the TCA project:
export SQ_TYPE=COMMON
- Then start the task
- Download the corresponding version of the SonarQube package and unzip it in the tools/common directory
- Copy the run.sh file to the bin directory of the decompressed SonarQube package
- Modify the tool location in sq.py
It is not recommended to use the SonarQube default password, so after successfully executing this project, it is recommended to modify the SonarQube password:
- Start SonarQube, change the password on the SonarQube page, and get the corresponding token
- In the setting.py file, modify the username field corresponding to SQ_LOCAL_USER and SQ_COMMON_USER to token and password to ""