build - 将 TeamCity 构建配置从一台服务器导入/导出到另一台服务器

将单个 TeamCity 构建配置从一台服务器移动到另一台服务器的最佳方式是什么?

我有一个本地 TeamCity 实例,我在此基础上进行测试。然后当构建足够成熟时,我在我们的主 TeamCity 服务器上手动创建它(眼球复制)。

是否有可以为我执行此操作的导出和导入功能?

最佳答案

不幸的是,没有这样的事情。 TeamCity 8 通过引入构建 ID 格式(项目名称 + 构建配置名称,可以覆盖)使“手动复制”构建配置变得可行,使情况有所改善:

基本上,您的所有 TeamCity 构建配置实际上只是 BuildServer\config\projects\文件夹和子文件夹中的 XML 文件。虽然我还没有尝试过,但如果 id 不冲突,您应该可以将项目文件夹或构建配置 XML 复制到新 TeamCity 实例上的适当目标。至少,您绝对可以通过这种方式使用更新覆盖现有项目(我过去曾做过“动态”动态更改构建配置的方法)。

当然,如果您的构建配置依赖于其他构建/工件,那么这些 id 也必须匹配,因此您必须同时复制它们或相应地调整 id。代理要求也是如此。

编辑:

随着 TeamCity 9 的推出,现在有一个更好的选择来在内置的 TeamCity 服务器之间移动项目:

Now TeamCity provides the ability to move projects among servers: you can transfer projects with all their data (settings, builds and changes history, etc.) and with your TeamCity user accounts from one server to another. All you need to do is create a usual backup file on the source TeamCity server containing the projects to be imported, put the backup file into the /import directory on the target server and follow the import steps on the Administration | Projects Import page.

完整摘要见 what's new in TeamCity 9 .

https://stackoverflow.com/questions/23224078/

相关文章:

build - 将 Common Lisp 编译为可执行文件

build - "fatal error U1087: cannot have : and::dep

docker - Docker 构建上下文的目的是什么?

c++ - 如何在 CMake 中正确创建目标之间的依赖关系?

build - 寻找真实世界的 Gradle 示例

java - Java项目中的build.xml

maven - 如何使用 Gulp、Maven 和 Jenkins 组织完整的构建管道,一直到集成测

visual-studio - Visual Studio 有 'ccache' 吗?

java - Maven 构建只更改了文件

maven-2 - 在 Maven 中,我可以在当前项目上方指定相对路径吗?