SonarQube 6.5 - 无法触发 TFS 构建定义
SonarQube 6.5 - Not able to trigger TFS Build Definition
我已将 SonarQube - 开始分析和结束分析任务添加到我的 TFS 构建定义中。我已经启动了 SonarQube 服务器 运行。我添加了一个 SonarQube 服务端点,并在配置 SonarQube 开始分析任务时添加了它。
然而,当我触发构建时,它无法抛出以下错误 -
'Unhandled Exception: System.IO.InvalidDataException: End of Central Directory record could not be found.'
知道问题出在哪里吗?
我正在使用 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.0.34\SonarQubePreBuild.ps1
SonarQube Scanner for MSBuild 1.1 Default properties file was not
found at C:\Program
Files\TFS2015Agent\tasks\SonarQubePreBuild.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)
要解决此问题,我必须在 TFS 中下载 latest version of the SonarQube build tasks。最简单的选择是导航到服务器上的管理 TFS 扩展页面,并使用它来下载和安装更新的 SonarQube 扩展。
完成后,我触发了 TFS 构建并能够克服此错误。
我已将 SonarQube - 开始分析和结束分析任务添加到我的 TFS 构建定义中。我已经启动了 SonarQube 服务器 运行。我添加了一个 SonarQube 服务端点,并在配置 SonarQube 开始分析任务时添加了它。
然而,当我触发构建时,它无法抛出以下错误 - 'Unhandled Exception: System.IO.InvalidDataException: End of Central Directory record could not be found.'
知道问题出在哪里吗? 我正在使用 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.0.34\SonarQubePreBuild.ps1
SonarQube Scanner for MSBuild 1.1 Default properties file was not
found at C:\Program
Files\TFS2015Agent\tasks\SonarQubePreBuild.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)
要解决此问题,我必须在 TFS 中下载 latest version of the SonarQube build tasks。最简单的选择是导航到服务器上的管理 TFS 扩展页面,并使用它来下载和安装更新的 SonarQube 扩展。
完成后,我触发了 TFS 构建并能够克服此错误。