2017-10-19 10 views
1

SonarQube - 分析開始および分析終了タスクをTFSビルド定義に追加しました。私はSonarQubeサーバーを稼働させています。私はSonarQube開始エンドポイントを追加し、それを追加しました。私はビルドをトリガーする場合しかし、それは以下のエラーをスロー失敗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) 
+0

これはおそらく[ナゲット](https://stackoverflow.com/questions/32493537/end-of-central-directory-record-could-not-be-found-nuget-in-vs-community-201)です。 )問題。両方のSonarQubeタスクが無効になっている場合、ビルドは成功しますか? –

+0

はいビルドは成功し、SonarQubeタスクは削除されます。 – Sammy

+0

エラーの一部が欠落しているようです。エラーログの一部を省略しなかったことを再度確認できますか? –

答えて

1

問題を解決するには、latest version of the SonarQube build tasksをTFSにダウンロードする必要がありました。最も簡単な方法は、サーバー上のAdmin TFS Extensionページに移動し、それを使用して更新されたSonarQube拡張をダウンロードしてインストールすることです。

enter image description here

それが終わった後は、私は、TFSのビルドトリガーと、このエラーを乗り越えることができました。

+0

あなたが問題を解決したことを知ってうれしいです。あなたは[回答として受け入れる]ことができます(https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work)。このスレッドを読んでいる他のコミュニティーのメンバーにとって有益です。 –

+0

これを実行しました。ありがとうございました。 – Sammy

関連する問題