[英]subversion release management with TeamCity
We currently use Subversion for our release management, and tag all of our releases (both to QA and to our production servers).我们目前使用 Subversion 进行发布管理,并标记我们所有的发布(包括 QA 和我们的生产服务器)。 However, we'd like to create a single Release directory reflecting our newest release instead.
但是,我们希望创建一个单一的 Release 目录来反映我们的最新版本。 This way we can have TeamCity always pull from the same folder for continuous builds.
这样,我们可以让 TeamCity 始终从同一个文件夹中提取以进行持续构建。 Also, if someone has to make a quick bug fix to production, they won't accidentally make it to the wrong branch.
此外,如果有人必须对生产环境进行快速错误修复,他们不会不小心将其移至错误的分支。
For example, below is our current structure with a 'release' folder added.例如,下面是我们当前的结构,添加了一个“发布”文件夹。 Would there be an easy way to move a tagged branch to 'release' each time, or even have 'release' be a link to the newest release_* version?
是否有一种简单的方法可以将标记的分支每次都移动到“发布”,或者甚至让“发布”成为最新 release_* 版本的链接?
Clarification澄清
Here's an example of how our build/release process currently works:以下是我们的构建/发布过程当前如何工作的示例:
I would (and do) take a slightly different approach to this.我会(并且确实)对此采取稍微不同的方法。 Source control management is primarily for, well, managing source and treating it as a means of tracking or implying releases can make life a little tricky.
源代码控制管理主要是为了管理源代码并将其视为跟踪或暗示发布的一种手段,这会使生活变得有些棘手。 This is really the purpose of your continuous integration environment and it does a far better job of it than what SVN does.
这确实是您的持续集成环境的目的,它比 SVN 做得更好。
I use TeamCity as the means of identifying both path and revision number to pull from SVN.我使用 TeamCity 作为识别从 SVN 中提取的路径和修订号的方法。 It's easy enough to define this at build runtime and any release to production is always done with caution (ie carefully check both path and revision).
在构建运行时定义这一点很容易,并且任何发布到生产环境时都要谨慎(即仔细检查路径和修订版)。 In the absolute worst case, if you do screw it up, you can always re-run the build with revised parameters.
在绝对最坏的情况下,如果你搞砸了,你总是可以使用修改后的参数重新运行构建。
You really don't want to end up making code changes directly to a "Releases" folder - this is what the trunk is for if it's mainstream development or branches are for if you've had to adjust an earlier revision.你真的不希望直接对“Releases”文件夹进行代码更改——如果它是主流开发,这就是主干的用途,如果你不得不调整早期版本,这就是分支的用途。 It's sort of beating SVN into submission to do something that's not its core strength, On that front, you might find some of the tips in The 10 commandments of good source control management useful.
它有点像击败 SVN 以屈服于做一些不是其核心优势的事情,在这方面,您可能会发现良好源代码控制管理的 10 条诫命中的一些技巧很有用。
You can easily script this so that after build completion you can copy a file or contents of a folder into release folder.您可以轻松编写脚本,以便在构建完成后将文件夹的文件或内容复制到发布文件夹中。 You can even delete the contents of the release folder before doing this.
您甚至可以在执行此操作之前删除发布文件夹的内容。 So yes, since a branch or tag in svn is a copy operation you can do this easily.
所以是的,因为 svn 中的分支或标签是一个复制操作,你可以轻松地做到这一点。
For each project we have a Latest
folder that contains, well, the latest version (usually just the binaries).对于每个项目,我们都有一个包含最新版本(通常只是二进制文件)的
Latest
文件夹。
This is extremely useful for continuous integration although we have to use custom MSBuild scripts to achieve this eg do a Svn delete on the contents then an Svn copy to the Latest folder.这对于持续集成非常有用,尽管我们必须使用自定义 MSBuild 脚本来实现这一点,例如对内容执行 Svn 删除,然后将 Svn 复制到最新文件夹。
You can use the svn:external
property to have a folder called release point to a different tag.您可以使用
svn:external
属性将名为 release 的文件夹指向不同的标签。 See svn:external .请参阅svn:external 。
svn propset svn:externals 'release http://my_repo/tags/latest_tag' .
You would have to update the property value to point to the latest tag each time a new tag release was made.每次发布新标签时,您都必须更新属性值以指向最新标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.