SONARSCANNER命令行执行
2021-02-05 本文已影响0人
9016
安装SONARSCANNER后,配置
/usr/local/sonar-scanner/conf/sonar-scanner.properties
写入:
sonar.host.url=http://172.16.233.72:9000
sonar.sourceEncoding=UTF-8
命令行执行:
/usr/local/sonar-scanner/bin/sonar-scanner -Dsonar.sources=/root/.jenkins/workspace/renren_sonarscanner -Dsonar.projectVersion=jenkins1.renren_sonarscanner.2021-02-05.12 -Dsonar.java.binaries=/root/.jenkins/workspace/renren_sonarscanner -Dsonar.projectKey=renren-fast -Dsonar.projectName=renren-fast -Dsonar.login=admin -Dsonar.password=admin -Dsonar.language=java
-Dsonar.projectVersion,版本号每次更新,否则sonarqube不会接受扫描结果