如何更改项目的构建配置模板?
以前,我的 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/