获取 TeamCity 构建最新标签

发布于 2024-11-26 04:37:22 字数 185 浏览 3 评论 0原文

我们希望设置 TeamCity 来监视我们的标签目录并在创建新标签时自动构建。

这意味着当我们准备好发布版本时,我们需要做的就是创建一个标签,然后 TeamCity 可以处理我们的构建、部署等。

目前唯一的解决方案是拥有一个 relase 分支,然后我们将标签复制到当我们创建它之后。理想情况下,我们希望删除这个额外的步骤。

We would like to set up TeamCity to monitor our tag directory and automatically build when a new tag is created.

This means that when we have a version ready for release all we need to do is create a tag and TeamCity can then take care of our build, deploy etc.

Currently the only solution is to have a relase branch which we then copy the tag to after we have created it. Ideally we would like to remove this extra step.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

暗喜 2024-12-03 04:37:22

不确定是否可以像您所描述的那样完成,因为 TC 不知道最新的标签是什么;除非您有一个实际的 Latest 标记,每次都会覆盖该标记,这很常见。

我认为减少手动工作的唯一方法可能是将您的 TC 项目 VSC 根设置为指向 myProj/tags/,然后将签出规则设置为 +:v1.2.3.4 其中 v1.2.3.4 是最新标签的名称。

因此,当您创建新标签时,只需更新签出规则以指向它,然后点击构建按钮即可。

Not sure it can be done as you described as TC wouldn't know what the latest tag is; unless you have an actual Latest tag which you overwrite each time which is quite common.

Only way I can think to reduce manual work is to perhaps setup your TC Project VSC Root to point at myProj/tags/ then set the check-out rule to +:v1.2.3.4 where v1.2.3.4 is the name of your latest tag.

So when you create a new tag, just update the check-out rule to point at it then hit the build button.

半寸时光 2024-12-03 04:37:22

我认为这个问题没有完美的解决方案,尽管 @sijw 确实提供了涉及最少手动步骤的答案。

这样做的原因是我们可以使用 Maven 获取最新的标签来部署到 Nexus。但我认为我们这样做的方式是错误的。

事实证明,使用 Maven 发布可以为您创建 SVN 标签,并在您创建新版本时部署到 Nexus。而不是先创建标签,然后从中删除。

也许任何寻找这个问题答案的人都应该将 Maven 版本作为解决方案。 (http://maven.apache.org/guides/mini/guide-releasing.html)

I don't think there is a perfect solution to the question, although @sijw does provide an answer that involves the least manual steps.

The reason for this was so we could get the latest tag to deploy to nexus using maven. However I think we are doing this in the wrong way.

It turns out that using Maven release can create an SVN tag for you as well as deploying to Nexus when you create a new version. Rather than creating the tag first and then deoplying from that.

Perhaps anyone looking for an answer to this question should look into Maven release as a solution. (http://maven.apache.org/guides/mini/guide-releasing.html)

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