如何在TeamCity中构建git标签? [英] How can I build a git tag in TeamCity?

查看:153
本文介绍了如何在TeamCity中构建git标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向TeamCity服务器提供一个git标记以进行构建. 我将标记(即release_1.1)作为参数传递给作业.因此,在作业内部,该标记可作为%tag%使用,但是在Version Control Settings下,我看不到任何使用此参数的方法,因此服务器可以检出此标记. 可以在设置中使用此参数来检出标签吗?

I want to provide a git tag to the TeamCity server to build it. I pass the tag (i.e. release_1.1) as a parameter to the job. So inside the job the tag is available as %tag%, but under the Version Control Settings I don't see any way to use this parameter so the server can checkout this tag. Is there any way this parameter can be used in the settings to checkout the tag?

推荐答案

  1. 转到编辑配置设置"->版本控制设置"
  2. 对于此构建配置的所有VCS根目录,请单击编辑",然后:

  1. Go to Edit Configuration Settings -> Version Control Settings
  2. For all your VCS roots for this build configuration click Edit and then:

  1. 将"+:refs/tags/*"放入分支规范"文本框中
  2. 选中将标签用作分支

然后,您可以在运行旁边按"..."按钮来选择标签.

Then you'll be able to choose a tag when you press the '...' button beside run.

这篇关于如何在TeamCity中构建git标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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