teamcity - 在 TeamCity 中更改构建模板

标签 teamcity teamcity-8.0 teamcity-9.0

如何更改项目的构建配置模板?

以前,我的 TeamCity 项目使用的是其他 5 个项目使用的通用构建模板。我通过复制现有模板创建了一个新模板,并进行了与我的项目相关的更改。现在我找不到在我的 TeamCity 项目中使用此模板的方法。

除了创建新的构建配置并继承新创建的构建模板之外,还有更简单的方法吗?

最佳答案

以下是在TeamCity doc中提到的:

  • You can create new build configurations based on a template.
  • You can associate any number of existing build configurations with a template: there's the Associate with Template option available from the Actions button at top right corner of the screen.


所以,选项 1 您必须通过每个构建配置,从旧模板中分离并附加到新模板。

选项 2 您可能需要考虑使用新设置修改现有模板,而不是创建副本。如果您只打算使用一个模板,这可能是合适的。

选项 3 是使用 TeamCity API它允许从/到模板读取、分离和附加构建配置:
GET/DELETE/PUT http://teamcity:8111/httpAuth/app/rest/buildTypes/<buildTypeLocator>/template

关于teamcity - 在 TeamCity 中更改构建模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32438541/

相关文章:

rest - 使用 REST API 更新 Teamcity 配置参数规范

.net - 无法在 TeamCity 中构建应用程序 (.NET Framework 4.6.2)

bash - 命令行将APK上载到Google Play商店

Teamcity 服务器迁移 - 代理更改

c# - OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL timed out

teamcity - 是否可以将 TeamCity 配置为使用 Visual Studio 2015 附带的 MSBuild?

git - 根据 git 子模块中的更改触发 TeamCity 构建

teamcity - 工件依赖关系未解决

Teamcity - bitbucket 的间歇性传输异常

msbuild - 为什么这个 Albacore msbuild 任务在 TeamCity 中失败?