删除 Teamcity 工件中的目录结构
我使用 Teamcity 构建不同的包,并希望将这些包保存为工件。我在 TeamCity 中的工件路径如下:
%system.teamcity.build.workingDir%\**\Release**/*.wsp => Solution
现在,TeamCity 在正确构建后会收集任何发布目录中的所有 WSP 文件。但它被保存,包括所有子目录,例如:
我只想要直接在 " 下的 .wsp 文件解决方案”,没有目录树。
I use Teamcity to build different packages and want to save those Packages as Artifacts. My Artifact Path in TeamCity is the following:
%system.teamcity.build.workingDir%\**\Release**/*.wsp => Solution
Now TeamCity collects all WSP-Files in any Release-Directory after building correctly. But it is saved including all subdirectories like:
I only want the .wsp-File directly under "solution" without the directory tree.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
来自 TeamCity 文档:
http://confluence.jetbrains.net/display/TCD65/Configuring +General+Settings#ConfiguringGeneralSettings-artifactPaths
在构建脚本(或其他最终构建步骤)中,您必须将必要的文件复制到单个文件夹中并将该文件夹发布为 Artifacts
From TeamCity docs:
http://confluence.jetbrains.net/display/TCD65/Configuring+General+Settings#ConfiguringGeneralSettings-artifactPaths
In your build script ( or additional final build step) you will have to copy the necessary files to a single folder and publish that folder as Artifacts
您可以通过修改 yout .csproj 文件中的 OutputPath 或在构建 .sln 时输入 OutDir 属性覆盖来实现某些目的,而不是像 @manojlds 建议的那样进行复制(如果您是的话)。请注意,这些方法都不是完美的 - 例如,TeamBuild(Visual Studio ALM 工具中的 CI 服务器)将所有内容重定向到一个目录,这可能会导致完全混乱,并且仅适用于最简单的情况。
Instead of copying as @manojlds suggests, you might be able to achieve something by modifying the OutputPath in yout .csproj file, or feeding in an OutDir property override when building a .sln (if you are). Be warned that neither of these approaches are perfect - for example, TeamBuild (the CI server in the Visual Studio ALM Tooling) redirects everything into one directory, which can cause a complete mess and only works for the most simple cases.
我遇到了这个问题,我想从子目录收集各种安装文件。添加 PowerShell 运行程序作为构建步骤非常强大,并且很好地解决了这个问题...
这将在 TeamCity 查看工件之前将它们移动到根目录,其中诸如
*.wsp
之类的基本工件路径可以选取它作为最终输出。I had this issue where I wanted to gather various install files from subdirectories. Adding a PowerShell runner as a build step is quite powerful and solves this nicely...
This will move them to the root prior to TeamCity looking at the artifacts, where the basic artifact paths like
*.wsp
can pick it up for the final output.