A plugin for TeamCity server allowing you to configure and run SonarQube analysis from the CI
APACHE-2.0 License
This plugin allows configuring and running SonarQube analysis on the TeamCity server.
The latest build of the plugin is available on the public TeamCity server and can be downloaded from the public TeamCity server:
From the TeamCity build targeted version bundle, copy into repository/lib
the JAR file(s) from webapps/ROOT/WEB-INF/lib/
:
mvn install:install-file -DgroupId=org.jetbrains.teamcity -Dpackaging=jar -DartifactId=server-tools -Dversion=2019.2 -Dfile=./.idea_artifacts/web_deployment_debug/WEB-INF/lib/server-tools.jar
server-tools.jar
common-tools.jar
(if exist, useless since TeamCity v2019.x)And run the following command in the root of the checked out repository:
mvn clean package
Install the plugin as described in the TeamCity documentation.
The most used properties can be configured via the TeamCity UI in a convenient way. Maven test results and JaCoCo code coverage results will be sent to the SonarQube Server automatically.
Any number of SonarQube Server connections can be defined for a project. A connection can be used in any Build Configuration under the project including those from subprojects.
The 'Edit project' permission is required to manage SonarQube servers (add/edit/remove, and view account).
Branches and Pull-Requests analysis parameters automatically provided on build from VCS build information, using SONARQUBE_SCANNER_PARAMS
environment variable. It requires TeamCity v2019.2 and SonarQube Developer Edition or above.
TeamCity will add build problems according to the results of the Build Breaker. TeamCity will look for the Build Breaker messages in the build log and parse them to produce TeamCity Build Problems.