SonarQube 5.3已停止分析Github请求

SonarQube 5.3已停止分析Github请求,sonarqube,sonarqube-scan,Sonarqube,Sonarqube Scan,我们最近将SonarQube版本从5.0更新为5.3,将SonarQube扫描仪/转轮从2.3更新为2.4 在这次升级过程中,SonarQube已经停止分析我们的GitHub请求。我们运行SonarQube扫描仪是jenkins工作的最后一步 我们运行的命令如下所示: /usr/local/sonar-runner/bin/sonar-runner -Dsonar.analysis.mode=issues \ -Dsonar.github.pullRequest=${ghprbPull

我们最近将SonarQube版本从5.0更新为5.3,将SonarQube扫描仪/转轮从2.3更新为2.4

在这次升级过程中,SonarQube已经停止分析我们的GitHub请求。我们运行SonarQube扫描仪是jenkins工作的最后一步

我们运行的命令如下所示:

/usr/local/sonar-runner/bin/sonar-runner -Dsonar.analysis.mode=issues \
     -Dsonar.github.pullRequest=${ghprbPullId} \
     -Dsonar.github.repository=OurRepository/OurRepository \
     -Dsonar.github.login=MyUsername \
     -Dsonar.github.oauth=MyToken \
     -Dsonar.login=MyUsername \
     -Dsonar.password=MyPassword \
     -Dsonar.sources=./app/ \
     -Dsonar.projectKey=MyProject \
     -Dsonar.projectName=MyProject \
     -Dsonar.projectVersion=2.9.0 \
     -Dsonar.exclusions=app/Vendor/**,app/Plugin/**/Test/**,app/Test/**
+ /usr/local/sonar-runner/bin/sonar-runner -Dsonar.analysis.mode=issues -Dsonar.github.pullRequest=2944 -Dsonar.github.repository=OurRepository/OurRepository -Dsonar.github.login=Username -Dsonar.github.oauth=MyToken -Dsonar.login=MyUsername -Dsonar.password=MyPAsword -Dsonar.sources=./app/ -Dsonar.projectKey=MyProject -Dsonar.projectName=MyProject -Dsonar.projectVersion=2.9.0 '-Dsonar.exclusions=app/Vendor/**,app/Plugin/**/Test/**,app/Test/**'
SonarQube Runner 2.4
Java 1.7.0_101 Oracle Corporation (64-bit)
Linux 3.10.0-327.13.1.el7.x86_64 amd64
INFO: Runner configuration file: /usr/local/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: /projectpath/sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /projectpath/./.sonar
INFO: SonarQube Server 5.3
12:54:00.422 INFO  - Load global repositories
12:54:00.927 INFO  - Load global repositories (done) | time=505ms
12:54:00.988 INFO  - User cache: /projectpath/.sonar/cache
12:54:01.016 INFO  - Exclude plugins: devcockpit, jira, pdfreport, views, report, buildstability, buildbreaker, scmstats
12:54:01.417 INFO  - Load plugins index
12:54:01.431 INFO  - Load plugins index (done) | time=14ms
12:54:02.121 INFO  - Found project [MyProject] cache [Thu May 19 11:29:15 CEST 2016]
12:54:02.280 INFO  - Process project properties
12:54:02.723 INFO  - Load project repositories
12:54:03.461 INFO  - Load project repositories (done) | time=738ms
12:54:03.485 INFO  - Apply project exclusions
12:54:03.629 INFO  - Load quality profiles
12:54:04.348 INFO  - Load quality profiles (done) | time=719ms
12:54:04.357 INFO  - Load active rules
12:54:09.383 INFO  - Load active rules (done) | time=5026ms
12:54:09.401 INFO  - Issues mode
12:54:09.401 INFO  - Scanning only changed files
12:54:09.405 INFO  - -------------  Scan MyProject
12:54:10.217 INFO  - Language is forced to php
12:54:10.238 INFO  - Load server rules
12:54:11.104 INFO  - Load server rules (done) | time=866ms
12:54:11.233 INFO  - Base dir: /projectpath/workspace
12:54:11.233 INFO  - Working dir: /projectpath/.sonar
12:54:11.235 INFO  - Source paths: app
12:54:11.235 INFO  - Source encoding: UTF-8, default locale: en_US
12:54:11.236 INFO  - Index files
12:54:11.265 INFO  - Excluded sources: 
12:54:11.266 INFO  -   app/Vendor/**
12:54:11.266 INFO  -   app/Plugin/**/Test/**
12:54:11.266 INFO  -   app/Test/**
12:54:11.266 INFO  -   app/Test/**
12:54:11.266 INFO  - Included tests: 
12:54:11.266 INFO  -   app/Test/**
12:54:16.551 INFO  - 983 files indexed
12:54:16.552 INFO  - 12296 files ignored because of inclusion/exclusion patterns
12:54:16.661 INFO  - Quality profile for php: Sonar way
12:54:17.180 INFO  - JaCoCoSensor: JaCoCo report not found : /projectpath/target/jacoco.exec
12:54:17.183 INFO  - JaCoCoItSensor: JaCoCo IT report not found: /projectpath/target/jacoco-it.exec
12:54:17.220 INFO  - Sensor NoSonar and Commented out LOC Sensor
12:54:17.926 INFO  - Sensor NoSonar and Commented out LOC Sensor (done) | time=706ms
12:54:17.926 INFO  - Sensor Lines Sensor
12:54:18.161 INFO  - Sensor Lines Sensor (done) | time=235ms
12:54:18.162 INFO  - Sensor PHPSensor
12:54:18.894 INFO  - 509 source files to be analyzed
12:54:28.909 INFO  - 265/509 files analyzed, current file: /projectpath/MyFile.php
12:54:38.479 INFO  - Sensor PHPSensor (done) | time=20317ms
12:54:38.479 INFO  - Sensor PHPUnit Sensor
12:54:38.479 INFO  - 509/509 source files have been analyzed
12:54:38.480 INFO  - PHPUnit xml test report not found: app/junit-output.xml
12:54:38.480 INFO  - PHPUnit xml unit test coverage report not found: app/clover-coverage.xml
12:54:38.480 INFO  - No PHPUnit integration test coverage report provided (see 'sonar.php.coverage.itReportPath' property)
12:54:38.480 INFO  - No PHPUnit overall coverage report provided (see 'sonar.php.coverage.overallReportPath' property)
12:54:38.480 INFO  - Sensor PHPUnit Sensor (done) | time=1ms
12:54:38.480 INFO  - Load server issues
12:54:40.752 INFO  - Load server issues (done) | time=2272ms
12:54:40.753 INFO  - Performing issue tracking
12:54:43.215 INFO  - 1210/1210 components tracked
12:54:43.216 INFO  - ANALYSIS SUCCESSFUL
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Total time: 45.188s
Final Memory: 7M/215M
INFO: ------------------------------------------------------------------------
在这次升级中,我们唯一改变的是分析模式。在升级之前,我们使用了增量模式,该模式已在5.2中删除

该命令的输出如下所示:

/usr/local/sonar-runner/bin/sonar-runner -Dsonar.analysis.mode=issues \
     -Dsonar.github.pullRequest=${ghprbPullId} \
     -Dsonar.github.repository=OurRepository/OurRepository \
     -Dsonar.github.login=MyUsername \
     -Dsonar.github.oauth=MyToken \
     -Dsonar.login=MyUsername \
     -Dsonar.password=MyPassword \
     -Dsonar.sources=./app/ \
     -Dsonar.projectKey=MyProject \
     -Dsonar.projectName=MyProject \
     -Dsonar.projectVersion=2.9.0 \
     -Dsonar.exclusions=app/Vendor/**,app/Plugin/**/Test/**,app/Test/**
+ /usr/local/sonar-runner/bin/sonar-runner -Dsonar.analysis.mode=issues -Dsonar.github.pullRequest=2944 -Dsonar.github.repository=OurRepository/OurRepository -Dsonar.github.login=Username -Dsonar.github.oauth=MyToken -Dsonar.login=MyUsername -Dsonar.password=MyPAsword -Dsonar.sources=./app/ -Dsonar.projectKey=MyProject -Dsonar.projectName=MyProject -Dsonar.projectVersion=2.9.0 '-Dsonar.exclusions=app/Vendor/**,app/Plugin/**/Test/**,app/Test/**'
SonarQube Runner 2.4
Java 1.7.0_101 Oracle Corporation (64-bit)
Linux 3.10.0-327.13.1.el7.x86_64 amd64
INFO: Runner configuration file: /usr/local/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: /projectpath/sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /projectpath/./.sonar
INFO: SonarQube Server 5.3
12:54:00.422 INFO  - Load global repositories
12:54:00.927 INFO  - Load global repositories (done) | time=505ms
12:54:00.988 INFO  - User cache: /projectpath/.sonar/cache
12:54:01.016 INFO  - Exclude plugins: devcockpit, jira, pdfreport, views, report, buildstability, buildbreaker, scmstats
12:54:01.417 INFO  - Load plugins index
12:54:01.431 INFO  - Load plugins index (done) | time=14ms
12:54:02.121 INFO  - Found project [MyProject] cache [Thu May 19 11:29:15 CEST 2016]
12:54:02.280 INFO  - Process project properties
12:54:02.723 INFO  - Load project repositories
12:54:03.461 INFO  - Load project repositories (done) | time=738ms
12:54:03.485 INFO  - Apply project exclusions
12:54:03.629 INFO  - Load quality profiles
12:54:04.348 INFO  - Load quality profiles (done) | time=719ms
12:54:04.357 INFO  - Load active rules
12:54:09.383 INFO  - Load active rules (done) | time=5026ms
12:54:09.401 INFO  - Issues mode
12:54:09.401 INFO  - Scanning only changed files
12:54:09.405 INFO  - -------------  Scan MyProject
12:54:10.217 INFO  - Language is forced to php
12:54:10.238 INFO  - Load server rules
12:54:11.104 INFO  - Load server rules (done) | time=866ms
12:54:11.233 INFO  - Base dir: /projectpath/workspace
12:54:11.233 INFO  - Working dir: /projectpath/.sonar
12:54:11.235 INFO  - Source paths: app
12:54:11.235 INFO  - Source encoding: UTF-8, default locale: en_US
12:54:11.236 INFO  - Index files
12:54:11.265 INFO  - Excluded sources: 
12:54:11.266 INFO  -   app/Vendor/**
12:54:11.266 INFO  -   app/Plugin/**/Test/**
12:54:11.266 INFO  -   app/Test/**
12:54:11.266 INFO  -   app/Test/**
12:54:11.266 INFO  - Included tests: 
12:54:11.266 INFO  -   app/Test/**
12:54:16.551 INFO  - 983 files indexed
12:54:16.552 INFO  - 12296 files ignored because of inclusion/exclusion patterns
12:54:16.661 INFO  - Quality profile for php: Sonar way
12:54:17.180 INFO  - JaCoCoSensor: JaCoCo report not found : /projectpath/target/jacoco.exec
12:54:17.183 INFO  - JaCoCoItSensor: JaCoCo IT report not found: /projectpath/target/jacoco-it.exec
12:54:17.220 INFO  - Sensor NoSonar and Commented out LOC Sensor
12:54:17.926 INFO  - Sensor NoSonar and Commented out LOC Sensor (done) | time=706ms
12:54:17.926 INFO  - Sensor Lines Sensor
12:54:18.161 INFO  - Sensor Lines Sensor (done) | time=235ms
12:54:18.162 INFO  - Sensor PHPSensor
12:54:18.894 INFO  - 509 source files to be analyzed
12:54:28.909 INFO  - 265/509 files analyzed, current file: /projectpath/MyFile.php
12:54:38.479 INFO  - Sensor PHPSensor (done) | time=20317ms
12:54:38.479 INFO  - Sensor PHPUnit Sensor
12:54:38.479 INFO  - 509/509 source files have been analyzed
12:54:38.480 INFO  - PHPUnit xml test report not found: app/junit-output.xml
12:54:38.480 INFO  - PHPUnit xml unit test coverage report not found: app/clover-coverage.xml
12:54:38.480 INFO  - No PHPUnit integration test coverage report provided (see 'sonar.php.coverage.itReportPath' property)
12:54:38.480 INFO  - No PHPUnit overall coverage report provided (see 'sonar.php.coverage.overallReportPath' property)
12:54:38.480 INFO  - Sensor PHPUnit Sensor (done) | time=1ms
12:54:38.480 INFO  - Load server issues
12:54:40.752 INFO  - Load server issues (done) | time=2272ms
12:54:40.753 INFO  - Performing issue tracking
12:54:43.215 INFO  - 1210/1210 components tracked
12:54:43.216 INFO  - ANALYSIS SUCCESSFUL
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Total time: 45.188s
Final Memory: 7M/215M
INFO: ------------------------------------------------------------------------

有人知道为什么这次升级阻止了SonarQube扫描器评论/分析我们的请求吗?

Duh,我们忘了在新的SonarQube实例上安装github插件

命令输出应包括:

开始分析拉取请求:

如果没有,你很可能会错过github插件