带有存档的 Teamcity 工件路径
如何将文件从文件夹复制到目标存档中的同一文件夹?
以下是我根据文档得出的结论。
file_name|directory_name|wildcard [ => target_directory|target_archive ]
%env.PROJECT%/EnvironmentSpecificAppSettings/* =>EnvironmentSpecificAppSettings | ..\..\..\..\..\..\..\Artifacts\CI\Website.%system.build.number%.%system.build.vcs.number.PROJECT_CI%.CI.zip
How do I copy files from a folder to the same folder in the target archive?
Below is what I came up with based on the documentation.
file_name|directory_name|wildcard [ => target_directory|target_archive ]
%env.PROJECT%/EnvironmentSpecificAppSettings/* =>EnvironmentSpecificAppSettings | ..\..\..\..\..\..\..\Artifacts\CI\Website.%system.build.number%.%system.build.vcs.number.PROJECT_CI%.CI.zip
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道三种选择。
正如 sharma 所指出的,您可以在常规设置中使用工件路径,这将允许您描述 buildAgent 上的文件到存档中的文件的映射。您可以在此处使用绝对路径或相对路径。我想我从来没有尝试过在那里使用属性扩展。
您还可以使用服务消息 -通过发出具有特殊输出格式的消息,您可以向 TeamCity 发出许多不同的命令,包括发布 Artifacts 的命令。
您还可以在构建中使用简单的文件复制到存档中的相应目录。 TeamCity 使用您需要的文件夹名称设置属性 - teamcity.buildConfName、teamcity.projectName、teamcity.agent.dotnet.build_id 等。
I know of three options.
As sharma noted, you can use artifact paths in General Settings, which will allow you to describe a mapping of files on the buildAgent to files in the archive. You can use absolute or relative paths here. I don't think I've ever tried using property expansions there.
You can also use service messages - by emitting a message with a special format to output, you can issue a number of different commands to TeamCity, including a command to publishArtifacts
You can also use a simple file copy in your build to the appropriate directory in the archive. TeamCity sets properties with the names of the folders that you will need - teamcity.buildConfName, teamcity.projectName, teamcity.agent.dotnet.build_id, etc.
如果您正在谈论常规设置中的工件路径。假设您希望将 teamcity 的 check out 目录中的 fodler 'Artifacts' 生成为 Artifacts.tgz 中的工件,那么您可能想说:
If you are talking about the artifact paths in General settings. Suppose you want the fodler 'Artifacts' in check out dir of the teamcity to be generated as artifacts in Artifacts.tgz then you may want to say: