如何或者是否可以在 TeamCity 中定义一个可在 VCS 根中使用的环境变量来签出特定标签并构建这些标签?
我有一个 TeamCity 项目设置,当前查看 svn 项目的主干,检查它,构建它,将其部署到服务器,然后对其运行一些测试。我对此进行了设置,以便一键部署服务,但它只能从主干使用。
我想设置 TeamCity 项目,以便当给定特定的 svn 标签(例如在环境变量中)时,它会检查该标签而不是主干,并构建、部署和测试该标签。是否可以更改 VCS 根以指向我定义的标签?如果没有,我可以通过其他方式做到这一点吗?
我正在使用 TeamCity 版本 4.5.4
感谢您的帮助。
I have a TeamCity project setup that currently looks at the trunk of my svn project, checks that out, builds it, deploys it to a server and then runs some tests on that. I set this up so there would be 1 click deployment of services, however it can only be used from the trunk.
I would like to setup the TeamCity project so that when given a specific svn tag (in an environment variable for example) it checks out that tag rather than the trunk and builds, deploys and tests this tag. Is it possible to change the VCS root to point to the tag I define? If not is there another way in which I can do this?
I'm using TeamCity version 4.5.4
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,所以这在 4.x 或更低版本中是不可能的。好吧,你可以在构建脚本中执行一个 hack,但这很丑陋!
这只有在 5.x 和 > 中才真正可能。您必须使用称为“模板”的东西。
这是关于如何设置的教程这些应该可以节省你我花在谷歌搜索上试图找到这个问题的答案的所有时间。
祝你好运!
Ok, so this is not possible in 4.x or below. Well there is a hack around you could perform in your build scripts but that is ugly!!
This is only truly possibly in 5.x and >. You would have to use something called "templates".
Here is a tutorial on how to set these up which should save you all the time I spent Googling around to try find an answer to this.
Good luck!