TeamCity 通过工件路径将 fxcop 和coveragereport 添加到构建工件中
我正在尝试获取 fxCop 结果 xml 和coveragereport.xml 以在构建后发布到工件。
以下是我现在所拥有的,
%system.teamcity.build.tempDir%/fxcop-output*/fxcop-result.xml => BuildLog/FxCop
%system.teamcity.build.tempDir%/teamcity*ncover/CoverageReport.xml => BuildLog/Coverage
但结果目录具有以下格式
BuildLog --> Coverage --> teamcity8681981431807223307ncover --> CoverageReport.xml
BuildLog --> FxCop --> fxcop-output-3810116228914218788 --> fxcop-result.xml
我很好奇我应该做什么才能使其如下而不包含文件夹结构。
BuildLog --> Coverage --> CoverageReport.xml
BuildLog --> FxCop --> fxcop-result.xml
谢谢
i'm trying to get the fxCop result xml and coveragereport.xml to publish to the artifacts after build.
the following is what I have now,
%system.teamcity.build.tempDir%/fxcop-output*/fxcop-result.xml => BuildLog/FxCop
%system.teamcity.build.tempDir%/teamcity*ncover/CoverageReport.xml => BuildLog/Coverage
but the result directory has the following format
BuildLog --> Coverage --> teamcity8681981431807223307ncover --> CoverageReport.xml
BuildLog --> FxCop --> fxcop-output-3810116228914218788 --> fxcop-result.xml
I am curious what should I do to make it like the following without the containing folder structure.
BuildLog --> Coverage --> CoverageReport.xml
BuildLog --> FxCop --> fxcop-result.xml
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于工件源定义中存在一个星号 (*),因此搜索模式可能会抓取多个源文件。
为了区分输出路径中的这些(理论上多个)文件,TeamCity 将在输出结构中添加 * - 模式的匹配,例如 [...]teamcity 8681981431807223307 ncover[...]。因此,不可能选择(可能)多个文件并将它们存储为一个文件。
也许不同的方法就是答案。您可以编写一个使用 TeamCity Build 的 MSBuild 脚本脚本交互功能,与此类似:
最后,在执行分析构建步骤后,可以使用带有 MSBuild 构建运行程序的 TeamCity 构建步骤来启动此脚本中的 msbuild 目标“PublishArtifacts”。
Because there is an asterisk (*) in the artifact source definition, there could be more than one source file grabbed by the search pattern.
To differenciate these (theoretically multiple) files in the output path, TeamCity will add the match for the * - pattern in the output structure, e.g. [...]teamcity 8681981431807223307 ncover[...]. Therefore it is impossible to select (potentially) multiple files and store them as one file.
Perhaps a different approach is the answer. You could write a MSBuild script that uses the TeamCity Build Script Interaction feature, similar to this:
Finally, a TeamCity Build Step with the MSBuild build runner could be used to start the msbuild target "PublishArtifacts" in this script after the analysis build steps were performed.