TeamCity 项目和多个 SVN 分支 [英] TeamCity Projects and Multiple SVN Branches

查看:29
本文介绍了TeamCity 项目和多个 SVN 分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本着保持我的 SVN 主干干净并准备好部署的精神,我一直在使用 以下源代码控制模型.对于不耐烦的人,基本概念是您创建开发分支来进行实际开发,并保持主干干净并随时准备部署(主干中没有垃圾).

In the spirit of keeping my SVN trunk clean and ready for deployment, I've been utilizing the following source control model. For the impatient, the basic concept is that you create development branches to do actual development, and leave the trunk clean and ready for deployment, at any time (no junk in the trunk).

除此之外,我正在配置 TeamCity 以进行持续集成.在 TeamCity 中,我想确保所有开发分支以及部署就绪分支(在我的例子中是主干)正确构建并通过所有单元测试.

In addition to this, I am configuring TeamCity for continuous integration. Within TeamCity, I'd like to ensure that all development branches, as well as the deployment-ready branch (the trunk, in my case) build correctly and pass all unit tests.

这可能是一个愚蠢的问题,但对 TeamCity 不是太熟悉,我应该为每个分支创建一个新的 TeamCity 项目吗?特别是部署就绪分支比开发分支有一些额外的规则.例如,版本应保存在文件系统上的版本目录中(例如,C:\Projects\MyProject\1.0.187...、C:\Projects\MyProject\1.0.188...),以便轻松访问二进制文件,在任何时间点.另一方面,在开发分支中保存程序集的版本副本是没有必要的,而且会浪费硬盘空间.

This might be a stupid question, but not being overly familiar with TeamCity, should I create a new TeamCity project for each branch? The deployment-ready branch, in particular, has a few additional rules than the development branch. For example, releases should be saved in versioned directories on the file system (e.g., C:\Projects\MyProject\1.0.187..., C:\Projects\MyProject\1.0.188...) to enable easy access to the binaries, at any point in time. On the other hands, saving versioned copies of the assemblies in the development branches is not necessary and would waste hard disk space.

在 TeamCity 中,我希望每个软件项目只看到一个项目.换句话说,如果我的公司正在从事 X 个开发项目,我希望该项目只列出一次,而不是 X * 2(假设每个项目只有两个分支).

Within TeamCity, I'd prefer to see only a single project for each software project. In other words, if my company is working on X number of development projects, I'd prefer to see that project listed only once, not X * 2 (assuming each project has only two branches).

推荐答案

您只需要创建一个项目,但您将需要多个构建配置 - 每个分支 1 个.据我所知,您无法自定义磁盘上的工件文件夹名称(它是一个自动递增编号),但是您可以从用户界面将所有工件下载为 TeamCity 4.5 中的 zip 文件.TeamCity 中还包含一个调度程序,可让您清理工件,以免它们占用太多磁盘空间.

You only need to create a single project, but you will need multiple build configurations - 1 for each branch. As far as I know, you can't customize the artifact folder name on disk (it's an auto-increment number), however you can download all artifacts as a zip file in TeamCity 4.5 from the UI. There is also a scheduler included with TeamCity that lets you cleanup artifacts so they don't consume too much disk space.

这篇关于TeamCity 项目和多个 SVN 分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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