2009-12-30 65 views
3

我试图标签,该标签作出这样多次签的构建:TeamCity的颠覆标签

+Root
+-trunk
+--Folder1
+--Folder2
+-Tags
+--ProjectA
+---Build-123
+----Folder1
+----Folder2

其中123内建123是内部版本号。

我试图通过使用下面的标签规则来实现这一目标:

/Root/trunk/Folder1=>/Root/tags/ProjectA
/Root/trunk/Folder2=>/Root/tags/ProjectA

而这个标签模式:

BUILD-%system.build.number%

我希望TeamCity的会让人产生BUILD-123标签和将Folder1和Folder2的内容复制到其中。不过,我得到以下错误:

Failed: Failed to set label 'BUILD-123': Svn labeling failed: Cannot copy 'Root/trunk/Folder1', 'Root/trunk/Folder2' to the same directory 'Root/tags/ProjectA/CO-BUILD-123'

我使用的TeamCity 5使用Subversion 1.6

回答

0

这似乎是SV​​N侧的限制。我找到的唯一解决方案是直接调用SVN创建目标文件夹(mkdir),然后使用svnCopy将每个源复制到该文件夹​​中。

0

请阅读TeamCity's docs这个话题:

我想你需要一个像

/Root/trunk=>/Root/Tags/ProjectA 

/trunk=>/Tags/ProjectA 

规则根据您存储库根。

0

看来,我们需要有标签的规则,如

trunk => tags  # the trunk contains the root of my project 
branches/*/ => tags # a branch usually contains the a copy of the root of the project 
tags/*/ => tags  # a tag usually contains the a copy of the root of the project 

这将使(重新)标签分支和标签不明确设置他们的名字。 不幸的是TeamCity没有这样的通用规则