从 TeamCity 下载构建版本
有没有办法在 TeamCity 中下载项目的特定版本?
Is there a way to download specific builds of a project in TeamCity?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
有没有办法在 TeamCity 中下载项目的特定版本?
Is there a way to download specific builds of a project in TeamCity?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
您可以使用构建 ID、构建编号或静态构建标识符之一:
http://confluence.jetbrains.net/display/TCD65/Patterns+For+Accessing+Build+Artifacts
You can use the build id, build number or one of the static build identifiers:
http://confluence.jetbrains.net/display/TCD65/Patterns+For+Accessing+Build+Artifacts
您实际上想要做的是在 TeamCity 中创建工件。工件通常是构建输出,然后附加到各个构建运行,以便您可以在以后下载和查看它们。有一个演练,包括在 You 中创建构建工件部署错误了! TeamCity、Subversion 和Web 部署第 5 部分:使用 TeamCity 进行 Web 部署。
What you're actually looking to do is create artifacts in TeamCity. Artifacts are normally a build output which are then attached to the individual build runs so that you can download and review them at a later date. There's a walk through including the creation of build artifacts in You're deploying it wrong! TeamCity, Subversion & Web Deploy part 5: Web Deploy with TeamCity.
我们将从构建生成的 .msi 文件附加为包含构建号的工件(您可以使用 %env.BUILD_NUMBER% 来查找工件路径)。
we attach the .msi file generated from the build as an artifact containing the build number (you can use %env.BUILD_NUMBER% to find the artifact path).
如上所述,可以使用 REST API 下载。也可以使用带有 Fluent api 的 FluentTc 库:
下载最新成功构建的工件:
下载来自特定构建工件的特定文件(按构建 ID):
As mentioned above, one can download using REST API. It is also possible using FluentTc library with fluent api:
Download artifacts of the latest successful build:
Download specific file from artifacts of specific build by build Id:
要从 Team City 获取最新的成功构建工件,您可以使用以下链接模板:
使用访客身份验证:
http:///guestAuth/downloadArtifacts.html?buildTypeId=& 使用访客身份验证的buildId=lastSuccessful
使用您的凭据:
http://;/repository/downloadAll//.lastSuccessful/artifacts.zip
具有特定工件:
http:/// httpAuth/repository/download//.lastSuccessful/
To get latest successful build artifacts from Team City you can use the following link templates:
with guest authentication:
http://<buildServer>/guestAuth/downloadArtifacts.html?buildTypeId=<buildTypeId>&buildId=lastSuccessful
with your credentials:
http://<buildServer>/repository/downloadAll/<buildTypeId>/.lastSuccessful/artifacts.zip
with specific artifact:
http://<buildServer>/httpAuth/repository/download/<buildTypeId>/.lastSuccessful/<some file.ext>