如何在 teamcity 中设置构建工件

发布于 2024-10-10 09:59:25 字数 824 浏览 6 评论 0原文

我正在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

够运 2024-10-17 09:59:25

那么您的问题是 TeamCity 将工件存储在其数据目录中,因此您无法指定绝对位置。您需要那个位置的文物吗?如果是这样,您将必须运行一个任务来从工件文件夹中复制它们(有一个 rest api 帮助您下载工件)

来自 文档

TeamCity 将工件存储在磁盘上
目录结构可以是
直接访问(例如,通过
将操作系统配置为
通过网络共享目录)。
工件存储在
/system/artifacts 文件夹。
存储格式描述于
TeamCity 数据目录部分。建造
工件未存档在 TeamCity 中
并保持原样(未压缩)。

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

TeamCity stores artifacts on disk in a
directory structure that can be
accessed directly (for example, by
configuring the Operating System to
share the directory over the network).
The artifacts are stored under
/system/artifacts folder.
Storage format is described in the
TeamCity Data Directory section. Build
artifacts are not archived in TeamCity
and stay as they are (uncompressed).

天涯沦落人 2024-10-17 09:59:25

@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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文