如何在TFS 2018中自动构建/发布定义? [英] How to automate Build/Release definitions in TFS 2018?
问题描述
我希望自动管理我的构建/发布定义,以便于备份/还原操作.
I wish to automate management of my Build/Release definitions, for easy backup/restore operations.
我如何在TFS 2018中做到这一点?我愿意使用REST API或SDK,尽管我会尽可能使用SDK.
How can I do this in TFS 2018? I'm open to using either the REST API or the SDK, although I prefer the SDK whenever possible.
-编辑-
这是用于TFS,而不是VSTS
This is for TFS, not VSTS
推荐答案
在TFS 2018和更高版本中,它直接支持导出/导入生成/发布定义.构建/发布定义在内部以.json文件的形式实现,因此您可以查看文件历史记录中更改的详细信息:
In TFS 2018 and later versions, it supports export/import build/release definitions directly. Build/Release definitions are implemented internally as .json files, so you can see details on changes in the file’s history:
查看以下发行说明:
https://docs.microsoft.com/en -us/visualstudio/releasenotes/tfs2018-relnotes#buildimport
或者您可以使用TFS REST API来获取构建和发布定义:
Or you can use TFS REST API to get build and release definitions:
- TFS build definition
- TFS release definition
添加有关如何检查构建定义历史记录的屏幕截图:
Adding a screenshot of how to check build definition history:
这篇关于如何在TFS 2018中自动构建/发布定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!