问题描述
我一直在尝试从文档中执行“从 Docker 映像运行 SonarScanner””
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.0.2311
INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
INFO: Linux 5.10.25-linuxkit amd64
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.8.0
INFO: Default locale: "en_US",source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=63ms
INFO: Server id: BF41A1F2-AXkMJHXiUF2U87mzcajk
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=35ms
INFO: Load/download plugins (done) | time=1086ms
INFO: Process project properties
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.438s
INFO: Final Memory: 5M/20M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: You must define the following mandatory properties for 'UnkNown': sonar.projectKey
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
我的猜测是 sonar-project.properties 没有被拾取,我不明白为什么不
docker run \
--rm \
--network=host \
-e SONAR_HOST_URL="http://127.0.0.1:9000/" \
-e SONAR_LOGIN="*token*" \
-v $(pwd)/idevops-crmservice:/root/src \
sonarsource/sonar-scanner-cli
当我尝试搜索此问题时,我真正得到的只是使用
sonar-runner -Dsonar.projectKey=
但这对我没有帮助,因为我需要获取 sonar-project.properties
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)