来自 lastSuccessful 分支构建的 TeamCity 工件 [英] TeamCity artifact from lastSuccessful branch build

查看:33
本文介绍了来自 lastSuccessful 分支构建的 TeamCity 工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近重新配置了 TeamCity 构建配置,以利用 Branch 功能将相同的构建配置应用于同一存储库中的多个分支.

I recently re-configured our TeamCity build configuration to take advantage of the Branch features to apply the same build configuration to multiple branches in the same repository.

现在,我正在尝试设置一个自动构建脚本,该脚本可以从 TeamCity 中提取最新工件,但仅限于特定分支.我能够使用 TeamCity REST API 在原始配置中的默认分支上正常工作,但无法弄清楚如何格式化 URL 以提取特定分支的工件.

Now, I'm trying to setup an automated build script that can pull the latest artifact from TeamCity, but only for a specific branch. I was able to get it working fine on the default branch in the original configuration, using the TeamCity REST API, but can't figure out how to format the URL to pull the artifact for a specific branch.

我查看了以下资源,但无济于事:

I've looked at the following resources, but to no avail:

http://confluence.jetbrains.com/display/TW/REST+API+插件http://confluence.jetbrains.com/display/TCD7/Patterns+For+Accessing+Build+Artifacts

想法?

推荐答案

我刚看到这篇文章.

我计划在接下来的几天内尝试一下,如果可行,我会为遇到此问题的其他人简要总结结果.

I plan on giving this a try over the next couple days, and if it works, I will give a brief summary of the result for anyone else who has trouble with this.

抱歉耽搁了,我才发现我从来没有回来报告我们是如何解决这个问题的.

Sorry for the delay, just realized that I never came back to report how we resolved this issue.

我们最终升级了 TeamCity(无论如何我们应该这样做,所以这没什么大不了的),一旦完成,它就可以毫不费力地运行良好.我们现在运行的是 TeamCity v8.1.5,以下是我们用来拉取工件的 URL 模式:

We ended up upgrading TeamCity (which we should have done anyway, so it wasn't a big deal), and once that was finished, it worked great without much effort. We're now running TeamCity v8.1.5, and here's the URL pattern we're using to pull our artifacts:

http:///httpAuth/app/rest/builds/buildType:,branch:/artifacts/content/;

注意:我们使用 httpAuth API 来授权访问我们的构建工件,因此我们还必须为我们的部署创建一个新的 TeamCity 用户.

NOTE: We're using the httpAuth API in order to authorize access to our build artifacts, so we also had to create a new TeamCity user for our deployments.

这篇关于来自 lastSuccessful 分支构建的 TeamCity 工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆