SonarQube系列 目录
- SonarQube (1) 基本环境搭建
- SonarQube (2) sonar runner安装配置
- SonarQube (3) C++插件安装与规则配置
- SonarQube (4) 运行一个Sample
- SonarQube (5) 集成至Jenkins
- SonarQube (终) Gitlab提交代码自动化测试
下载SonarQube Runner安装包
https://docs.sonarqube.org/display/SONARQUBE45/Installing+and+Configuring+SonarQube+Runner
-
sonar-runner压缩包下载: SonarQube Runner
-
sonar-scanner压缩包下载: SonarQube Scanner
解压至任一目录(/etc/)
配置SonarQube Runner
vi /etc/conf/sonar-runner.properties
#----- PostgreSQL
sonar.jdbc.url=jdbc:postgresql://localhost/sonar
#----- Global database settings
sonar.jdbc.username=sonar
sonar.jdbc.password=YOUR_PASSWORD
创建SONAR_RUNNER_HOME环境变量
vi /etc/profile.d/sonarrc.sh
export SONAR_RUNNER_HOME=/etc/sonar-runner
export PATH=$PATH:$SONAR_RUNNER_HOME/bin
source /etc/profile.d/sonarrc.sh
验证
sonar-runner -h
参考
https://docs.sonarqube.org/display/SONARQUBE45/Installing+and+Configuring+SonarQube+Runner
网友评论