简体   繁体   English

如何在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. 我希望自动管理我的构建/发布定义,以便轻松进行备份/恢复操作。

How can I do this in TFS 2018? 我怎样才能在TFS 2018中做到这一点? I'm open to using either the REST API or the SDK, although I prefer the SDK whenever possible. 我愿意使用REST API或SDK,尽管我更喜欢SDK。

--EDIT-- - 编辑 -

This is for TFS, not VSTS 这适用于TFS,而不是VSTS

In TFS 2018 and later versions, it supports export/import build/release definitions directly. 在TFS 2018及更高版本中,它直接支持导出/导入构建/发布定义。 Build/Release definitions are implemented internally as .json files, so you can see details on changes in the file's history: 构建/发布定义在内部实现为.json文件,因此您可以查看文件历史记录中更改的详细信息:

在此输入图像描述

在此输入图像描述

在此输入图像描述

在此输入图像描述

Check the following release note: 请查看以下发行说明:

https://docs.microsoft.com/en-us/visualstudio/releasenotes/tfs2018-relnotes#buildimport https://docs.microsoft.com/en-us/visualstudio/releasenotes/tfs2018-relnotes#buildimport

Or you can use TFS REST API to get build and release definitions: 或者您可以使用TFS REST API来获取构建和发布定义:


Adding a screenshot of how to check build definition history: 添加如何检查构建定义历史记录的屏幕截图:

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM