我已将SonarQube - 开始分析和结束分析任务添加到我的TFS构建定义中。我的SonarQube服务器正常运行。我添加了一个SonarQube服务端点,并在配置SonarQube Begin分析任务时添加了它。SonarQube 6.5 - 无法触发TFS构建定义
然而,当我触发构建,它没有抛出下面的错误 - “未处理的异常:System.IO.InvalidDataException:中央目录记录的到底能不能找到。”
任何想法可能是什么问题? 我正在使用SonarQube 6.5版本。
Starting: Get sources
Running tasks
Starting task: Fetch the Quality Profile from SonarQube
Executing the powershell script: c:\Program
Files\TFS2015Agent\tasks\SonarQubePreBuild\1.0.34\SonarQubePreBuild.ps1
SonarQube Scanner for MSBuild 1.1 Default properties file was not
found at C:\Program
Files\TFS2015Agent\tasks\SonarQubePreBuild\1.0.34\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml
Pre-processing started. Preparing working directories... Checking for
updates... Unhandled Exception: System.IO.InvalidDataException: End of
Central Directory record could not be found.
at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen)
at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
at System.IO.Compression.ZipFile.ExtractToDirectory(String sourceArchiveFileName, String destinationDirectoryName, Encoding entryNameEncoding)
at SonarQube.Bootstrapper.BuildAgentUpdater.TryUpdate(String hostUrl, String targetDir, ILogger logger)
at SonarQube.Bootstrapper.Program.PreProcess(IBuildAgentUpdater updater, IBootstrapperSettings settings, ILogger logger)
at SonarQube.Bootstrapper.Program.Execute(String[] args, IBuildAgentUpdater updater, ILogger logger)
at SonarQube.Bootstrapper.Program.Main(String[] args)
也许这是[Nuget](https://stackoverflow.com/questions/32493537/end-of-central-directory-record-could-not-be-found-nuget-in-vs-community-201 )的问题。当SonarQube任务被禁用时,构建是否成功? –
是的,构建成功与删除SonarQube任务。 – Sammy
部分错误似乎已丢失。你能仔细检查一下你没有忽略错误日志的一部分吗? –