开发者

TeamCity Subversion labelling

开发者 https://www.devze.com 2022-12-15 15:56 出处:网络
I\'m trying to label a build that is made of multiple checkouts like this: +Root +-trunk +--Folder1 +--Folder2

I'm trying to label a build that is made of multiple checkouts like this:

+Root

+-trunk

+--Folder1

+--Folder2

+-Tags

+--ProjectA

+---Build-123

+----Folder1

+----Folder2

where 123 in Build-123 is the build number.

I'm trying to achieve this by using the following labelling rules:

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

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

And this labelling pattern:

BUILD-%system.build.number%

I was hoping that TeamCity would create the BUILD-123 tag and copy the contents of Folder1 and Folder2 into it. However I get the following error:

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开发者_JS百科-BUILD-123'

I'm using TeamCity 5 with Subversion 1.6


This seems to be a limitation on SVN side. The only solution I've found is to call SVN directly to create the destination folder first (mkdir) then use svnCopy to copy each source into that folder.


It seems we need to have labeling rules such as

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

this will enable (re)tagging branches and tags without explicitly setting their names. unfortunately TeamCity does not have such generic rules


Please read TeamCity's docs about this topic:

I suppose you need rules like

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

or

/trunk=>/Tags/ProjectA

depending on where you repository root is.

0

精彩评论

暂无评论...
验证码 换一张
取 消