如何在 teamcity 中设置构建工件
我正在尝试在 teamcity 中设置构建工件,但遇到了问题。这是工件命令:
Services\Windows\ApiRequestProcess\ApiRequestLoggerService\bin\Release\* => F:\BuildArtifacts\Services\ApiRequestLogger
这是错误之一:
16:43:33]: [Publishing artifacts] Paths to publish: [Services\Windows\ApiRequestProcess\ApiRequestLoggerService\bin\Release\* => F:\BuildArtifacts\Services\ApiRequestLogger, teamcity-info.xml]
[16:43:33]: [Publishing artifacts] Sending files
[16:43:34]: Failed to upload build artifact due to error: java.io.FileNotFoundException: F:\TeamCity\.BuildServer\system\artifacts\API Request Logger Service\API Request Logger Service Build\536\F:\BuildArtifacts\Services\ApiRequestLogger\ApiRequestCore.dll (The filename, directory name, or volume label syntax is incorrect)
有什么想法吗?
I'm trying to setup a build artifact in teamcity but am having issues. Here's the artifact command:
Services\Windows\ApiRequestProcess\ApiRequestLoggerService\bin\Release\* => F:\BuildArtifacts\Services\ApiRequestLogger
And here is one of the errors:
16:43:33]: [Publishing artifacts] Paths to publish: [Services\Windows\ApiRequestProcess\ApiRequestLoggerService\bin\Release\* => F:\BuildArtifacts\Services\ApiRequestLogger, teamcity-info.xml]
[16:43:33]: [Publishing artifacts] Sending files
[16:43:34]: Failed to upload build artifact due to error: java.io.FileNotFoundException: F:\TeamCity\.BuildServer\system\artifacts\API Request Logger Service\API Request Logger Service Build\536\F:\BuildArtifacts\Services\ApiRequestLogger\ApiRequestCore.dll (The filename, directory name, or volume label syntax is incorrect)
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
那么您的问题是 TeamCity 将工件存储在其数据目录中,因此您无法指定绝对位置。您需要那个位置的文物吗?如果是这样,您将必须运行一个任务来从工件文件夹中复制它们(有一个 rest api 帮助您下载工件)
来自 文档
Well your issue is TeamCity stores artifacts in its data directory so you cannot specify an absolute location. Do you need the artifacts in that location? If so you will have to run a task to copy them from the artifacts folder (there is a rest api to help you with the downloading of artifacts)
From the docs
@redsquare是正确的。 TeamCity 正在归档与您的构建相关的工件。在使用 TeamCity 之前,我也按照您描述的方式进行了操作;)
真正的问题是您为什么要这样做(因为您的构建已经存档)?我大胆猜测...
如果您这样做是为了便于部署或通过其他构建进行访问,那么还有一个替代方案...在 TeamCity 中讲:依赖项/工件依赖项。您可以在另一个 CI 构建中使用 CI 构建的输出……或者以直接的方式在部署构建中使用。
查看我的答案此处了解更多详细信息。
@redsquare is correct. TeamCity is archiving artifacts relative to your build. Previous to TeamCity I did it the way you describe too ;)
The real question is why do you want to do that (as your build are already archived)? I'll hazard a guess...
If you are doing it to be accessible for deployment or by another build there is an alternative... In TeamCity speak: Dependencies / Artifact Dependency. You can consume the output of your CI build in another CI build... or in a deploy build in a straight forward manner.
See my answer here for more detail.