SonarQube - 5.3
C#插件 - 5.0
SonarQube扫描仪2.1
TFS 2015 Update 2.1
当我在构建服务器上执行构建时,它会说
无法在SonarQube服务器上找到文件。网址:http://server:9081/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
我可以登录Sonar服务器,我还在环境变量下的路径变量中添加了Sonar MSBuild.SonarQube.Runner.exe
的路径。
我在这里遗漏了什么吗?
有人可以帮我解决这个问题吗?
2016-07-18T12:20:40.6290351Z Checking if artifacts directory exists: D:\BuildAgent\_work\8\a
2016-07-18T12:20:40.6290351Z Deleting artifacts directory.
2016-07-18T12:20:40.6330353Z Creating artifacts directory.
2016-07-18T12:20:40.6330353Z Checking if test results directory exists: D:\BuildAgent\_work\8\TestResults
2016-07-18T12:20:40.6330353Z Deleting test results directory.
2016-07-18T12:20:40.6340353Z Creating test results directory.
2016-07-18T12:20:40.6880384Z Starting: Get sources
2016-07-18T12:20:40.6930387Z Entering TfsGitSourceProvider.PrepareRepositoryAsync
2016-07-18T12:20:40.6930387Z localPath=D:\BuildAgent\_work\8\s
2016-07-18T12:20:40.6930387Z clean=False
2016-07-18T12:20:40.6930387Z sourceBranch=refs/heads/master
2016-07-18T12:20:40.6930387Z sourceVersion=8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.6940388Z Syncing repository: PSA (Git)
2016-07-18T12:20:40.6940388Z repository url=http://server:8080/tfs/AjayTestCollection/_git/PSA
2016-07-18T12:20:40.6950388Z checkoutSubmodules=False
2016-07-18T12:20:40.7570424Z Starting fetch...
2016-07-18T12:20:40.9230519Z Checking out 8a38426975d589b8ba02ae545fa989588221143c to D:\BuildAgent\_work\8\s
2016-07-18T12:20:40.9570538Z Checked out branch refs/heads/master for repository PSA at commit 8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.9570538Z commit=8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.9570538Z Leaving TfsGitSourceProvider.PrepareRepositoryAsync
2016-07-18T12:20:41.0360583Z Running tasks
2016-07-18T12:20:41.0510592Z Starting task: NuGet restore **\*.sln
2016-07-18T12:20:41.0770607Z Set workingFolder to default: D:\BuildAgent\tasks\NuGetInstaller\0.1.17
2016-07-18T12:20:41.1000620Z Executing the powershell script: D:\BuildAgent\tasks\NuGetInstaller\0.1.17\NuGetInstaller.ps1
2016-07-18T12:20:41.3220747Z D:\BuildAgent\agent\worker\tools\NuGet.exe restore "D:\BuildAgent\_work\8\s\CIBuildPSA\CIBuildPSA.sln" -NonInteractive
2016-07-18T12:20:41.6210918Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
2016-07-18T12:20:41.6870956Z Finishing task: NuGetInstaller
2016-07-18T12:20:41.6950960Z Starting task: Fetch the Quality Profile from SonarQube
2016-07-18T12:20:41.6970961Z Executing the powershell script: D:\BuildAgent\tasks\SonarQubePreBuild\1.0.34\SonarQubePreBuild.aps1
2016-07-18T12:20:41.8101026Z ##[debug]
2016-07-18T12:20:42.0451161Z SonarQube Scanner for MSBuild 1.1
2016-07-18T12:20:42.0461161Z Default properties file was not found at D:\BuildAgent\tasks\SonarQubePreBuild\1.0.34\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml
2016-07-18T12:20:42.0471162Z Pre-processing started.
2016-07-18T12:20:42.0481162Z Preparing working directories...
2016-07-18T12:20:42.0491163Z Checking for updates...
2016-07-18T12:20:42.0511164Z ##[error]Could not find a file on the SonarQube server. Url: http://server:9081/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
2016-07-18T12:20:42.0521165Z ##[error]Failed to update the SonarQube Scanner for MSBuild binaries. Check the server url, verify that the C# plugin is correctly installed on the SonarQube server and that the SonarQube server has been restarted.
2016-07-18T12:20:42.0531165Z ##[error]Pre-processing failed. Exit code: 1
2016-07-18T12:20:42.0821182Z ##[error]Unexpected exit code received from batch file: 1
2016-07-18T12:20:42.0961190Z Finishing task: SonarQubePreBuild
2016-07-18T12:20:42.1451218Z Starting task: Copy Files to: $(build.artifactstagingdirectory)
2016-07-18T12:20:42.1541223Z Set workingFolder to default: D:\BuildAgent\tasks\CopyFiles\1.0.13
2016-07-18T12:20:42.3601341Z ##[debug]check path : D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3601341Z ##[debug]set resource file to: D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3611341Z ##[debug]system.culture=en-US
2016-07-18T12:20:42.3611341Z ##[debug]load strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3611341Z ##[debug]load loc strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.3621342Z ##[debug]Contents=**\bin\release\**
2016-07-18T12:20:42.3621342Z ##[debug]SourceFolder=D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3621342Z ##[debug]check path : D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3631342Z ##[debug]TargetFolder=D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.3631342Z ##[debug]CleanTargetFolder=false
2016-07-18T12:20:42.3631342Z ##[debug]OverWrite=false
2016-07-18T12:20:42.3631342Z ##[debug]include content pattern: **\bin\release\**
2016-07-18T12:20:42.3881357Z ##[debug]find D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3891357Z ##[debug]179 matches.
2016-07-18T12:20:42.3951361Z ##[debug]allFiles contains 128 files
2016-07-18T12:20:42.3951361Z ##[debug]Include matching D:\BuildAgent\_work\8\s\**\bin\release\**
2016-07-18T12:20:42.3991363Z ##[debug]Include matched 0 files
2016-07-18T12:20:42.4001364Z ##[debug]load strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\node_modules\vsts-task-lib\lib.json
2016-07-18T12:20:42.4011364Z ##[debug]load loc strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\node_modules\vsts-task-lib\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.4021365Z found 0 files
2016-07-18T12:20:42.4081368Z Finishing task: CopyFiles
2016-07-18T12:20:42.4121370Z Starting task: Publish Artifact: drop
2016-07-18T12:20:42.4131371Z Set workingFolder to default: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28
2016-07-18T12:20:42.5991477Z ##[debug]check path : D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6001478Z ##[debug]set resource file to: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6001478Z ##[debug]system.culture=en-US
2016-07-18T12:20:42.6011479Z ##[debug]load strings from: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6011479Z ##[debug]load loc strings from: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.6021479Z ##[debug]system.hosttype=build
2016-07-18T12:20:42.6021479Z ##[debug]PathtoPublish=D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.6021479Z ##[debug]check path : D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.6031480Z ##[debug]ArtifactName=drop
2016-07-18T12:20:42.6031480Z ##[debug]ArtifactType=Container
2016-07-18T12:20:42.6041480Z ##[debug]TargetPath=\\my\share\Main_Sonar\20160718.7
2016-07-18T12:20:42.9871699Z Max Concurrent Uploads 4, Max Creators 1
2016-07-18T12:20:43.0141715Z Found 0 files to upload.
2016-07-18T12:20:43.0171717Z Created 0 files without uploading content. Total files processed 0
2016-07-18T12:20:43.0181717Z Uploaded artifact 'D:\BuildAgent\_work\8\a' to container folder 'drop' of build 102.
2016-07-18T12:20:43.2781866Z Associated artifact 83 with build 102
2016-07-18T12:20:43.2871871Z Finishing task: PublishBuildArtifacts
2016-07-18T12:20:43.2891872Z ##[error]Task SonarQubePreBuild failed. This caused the job to fail. Look at the logs for the task for more details.
答案 0 :(得分:1)
安装SonarQube服务器后,您需要以管理员身份登录服务器,转到更新中心(设置|系统|更新中心),然后安装 SonarQube C#Plug-在强>
此外,安装插件后,SonarQube必须重新启动。
您可以检查是否已完成上述步骤。在以下链接中,有关于如何安装和配置SonarQube的详细指南,您可以轻松下载: