我已將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
部分錯誤似乎已丟失。你能仔細檢查一下你沒有忽略錯誤日誌的一部分嗎? –