完成步骤时SonarQube扩展失败

时间:2017-10-14 07:25:43

标签: c# tfs sonarqube azure-devops sonarqube-scan

我正在尝试为TFS-VSTS设置一个sonarqube服务器和SonarQube Extension。服务器运行正常。

因此,对于tfs扩展,我创建了一个持续集成构建定义并添加了扩展步骤。

enter image description here

但结果是每个构建都失败并出现相同的错误:

2017-10-13T16:19:29.5062715Z INFO: Analysis report generated in 11485ms, dir size=24 MB
2017-10-13T16:19:40.6625181Z INFO: Analysis reports compressed in 11140ms, zip size=8 MB
2017-10-13T16:19:44.2718958Z INFO: ------------------------------------------------------------------------
2017-10-13T16:19:44.2718958Z INFO: EXECUTION FAILURE
2017-10-13T16:19:44.2718958Z INFO: ------------------------------------------------------------------------
2017-10-13T16:19:44.2718958Z INFO: Total time: 1:01.328s
2017-10-13T16:19:44.2718958Z INFO: Final Memory: 48M/134M
2017-10-13T16:19:44.2718958Z INFO: ------------------------------------------------------------------------
2017-10-13T16:19:44.2718958Z ##[error]ERROR: Error during SonarQube Scanner execution
2017-10-13T16:19:44.2718958Z ##[error]ERROR: Failed to upload report - 500: An error has occurred. Please contact your administrator
2017-10-13T16:19:44.2718958Z ##[error]ERROR:
2017-10-13T16:19:44.2718958Z ##[error]ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
2017-10-13T16:19:44.3969783Z ##[error]The SonarQube Scanner did not complete successfully
2017-10-13T16:19:44.3969783Z 18:19:44.35  Creating a summary markdown file...
2017-10-13T16:19:44.3969783Z ##[error]18:19:44.35  Post-processing failed. Exit code: 1
2017-10-13T16:19:44.4125201Z ##[error]System.Exception: Unexpected exit code received from batch file: 1
2017-10-13T16:19:44.4125201Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Task.Internal.PowerShell.InvokeBatchScriptCmdlet.ProcessRecord()
2017-10-13T16:19:44.4125201Z ##[error]   at System.Management.Automation.CommandProcessor.ProcessRecord()
2017-10-13T16:19:44.4906463Z ##[debug]Calling InvokeGetRestMethod "/api/server/version" 
2017-10-13T16:19:44.5531455Z ##[debug]Variable read: MSBuild.SonarQube.HostUrl = http://server/
2017-10-13T16:19:44.5843967Z ##[debug]Variable read: MSBuild.SonarQube.ServerUsername = ********
2017-10-13T16:19:44.5843967Z ##[debug]Variable read: MSBuild.SonarQube.ServerPassword = 
2017-10-13T16:19:44.6000209Z ##[debug]GET http://server/api/server/version with 0-byte payload
2017-10-13T16:19:44.6156456Z ##[debug]received 11-byte response of content type text/plain
2017-10-13T16:19:44.6937737Z Waiting on the SonarQube server to finish processing in order to determine the quality gate status.
2017-10-13T16:19:44.7250216Z ##[error]System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407 ---> System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407
2017-10-13T16:19:44.7406462Z ##[error]   --- End of inner exception stack trace ---
2017-10-13T16:19:44.7406462Z ##[error]   at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-10-13T16:19:44.7406462Z ##[error]   at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-10-13T16:19:44.7406462Z ##[error]   at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-10-13T16:19:44.7406462Z ##[error]   at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-10-13T16:19:44.7406462Z ##[error]   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-10-13T16:19:44.7406462Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken, Int32 timeoutInMinutes)
2017-10-13T16:19:44.7406462Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource)

已安装的sonarqube版本为6.5.0.27846,这也是/api/server/version的响应。扩展版本为3.0.2,此构建定义的MSBuild设置为15.0 x86。目前我已经没有想法来解决这个问题了。

run SonarQube Scanner using the -X switch to enable full debug logging.我在哪里可以添加-X开关?要在Additional Settings部分的准备步骤中添加,请退出Unrecognized command line argument: -X

0 个答案:

没有答案