一个版本如何控制 TeamCity 项目的配置?
在我的 CruiseControl 实例中,我对 ccnet.config 文件进行版本控制。
当我想要更新 CruiseControl 时,我运行一个“更新配置”作业,该作业从版本控制中获取配置。
通过这种方式,版本的构建过程是由配置管理的。
我想知道如何在 TeamCity 下有效地实现这些目标。
In my CruiseControl instances, I have version controlled the ccnet.config file.
When I want to update CruiseControl, I run an "update config" job which fetches the config from version control.
In this manner, the very build process of a release is configuration managed.
I am wondering how to achieve these goals effectively under TeamCity.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我尝试让我使用的 CI 尽可能简单,并将尽可能多的构建运行放入 msbuild 或 nant 脚本中,包括运行测试、代码覆盖率等。
这样做的好处是:
I try to keep what ever CI I am using as light as possible and put as much of the running of the build into an msbuild or nant script including running tests, code coverage, etc.
The benefit of this is:
这已在 TeamCity 9 中引入。还在另一篇文章中回答:
TeamCity 的版本控制(例如在 TFS 中)构建配置 - 可能吗?
This has been introduced in TeamCity 9. Also answered in another post:
Version control (e.g. in TFS) build configuration for TeamCity - is it possible?
我长期以来一直想要一种对 TeamCity 配置进行源代码控制的方法。我最终编写了一个 Windows 服务来监视配置目录并将更改提交到 git。
该项目位于 GitHub 上:https://github.com/grenade/teamcity-config-monitor
I've been wanting a way to source control TeamCity config for a long time. I ended up writing a Windows Service which monitors the configuration directory and commits changes to git.
The project is on GitHub: https://github.com/grenade/teamcity-config-monitor
您可以尝试查看升级之前(或恢复团队城市时)备份的文件夹,因为这些文件夹代表您自初始安装以来所做的配置和更改。
http://confluence.jetbrains.net/display/TCD4/TeamCity+Data+备份
一些相关数据实际上是一个数据库,(事实上,文档建议您将 team city 指向一个真实的数据库,如 mysql,而不是它使用的默认嵌入式数据库)
您可以尝试将这些数据签入 SVN,但您需要停止 team city 进行任何签入操作。
You might try looking at the folders that are backed up prior to upgrade (or when restoring team city) as those represent the configurations and changes you've made since initial installation.
http://confluence.jetbrains.net/display/TCD4/TeamCity+Data+Backup
Some of the relevant data is actually a database, (and in fact the documentation advises you to point team city to a real database like mysql instead of the default embedded database it uses)
You could try checking those into SVN, but you'll want to stop team city for any check-in actions.