来自版本控制的 TFS 2017 发布管理工件文件 [英] TFS 2017 release management artifact files from version control

查看:24
本文介绍了来自版本控制的 TFS 2017 发布管理工件文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在发布管理时从源代码管理 (tfvc) 访问一些文件.我找到的来源是构建(类型Build")和整个源代码树(类型Team Foundation Version Control").

I would like to access some files from source control (tfvc) while release management. The sources I found are either build (type "Build") and the whole source tree (type "Team Foundation Version Control").

Team Foundation Version Control"类型似乎匹配,但不允许选择子文件夹,例如$/MyApp/branches/V2/scripts".

The type "Team Foundation Version Control" seems to match, but it is not allowed to select sub folder, e.g. "$/MyApp/branches/V2/scripts".

我需要为脚本文件创建一个工件吗?

Do I need to create an artifact for the script files?

推荐答案

我强烈建议不要在单独的存储库中链接,而是将它们作为构建工件发布(如其他答案所述)或作为版本发布NuGet 包.

Instead of linking in a separate repository, I'd strongly recommend either publishing them as a build artifact (as the other answer mentions) or publishing them as a versioned NuGet package.

原因是部署中的所有内容都应该一起进行版本控制.与其他一切不同步的脚本可能会因未知原因导致突然的部署失败.假设您将这些脚本作为工件链接,并从开发 -> 生产开始沿您的管道进行部署.开发部署很好.QA 部署很好.分阶段部署很好.生产部署...失败?由于脚本中的错误?

The reason is because everything that goes into a deployment should be versioned together. Scripts that are changing out of sync with everything else can cause abrupt deployment failures for unknown reasons. Let's say you linked those scripts in as an artifact and started a deployment along your pipeline from Dev -> Production. Dev deployment is fine. QA deployment is fine. Staging deployment is fine. Production deployment... fails? Because of an error in the scripts?

糟糕,有人对这些脚本进行了更改并引入了一个错误.但是脚本没有版本控制,因此您无法保证之前阶段使用的脚本与生产阶段使用的脚本相同.

Whoops, someone committed a change to those scripts and introduced a bug. But the scripts weren't versioned, so you had no way of guaranteeing that the scripts being used in prior stages were the same as the scripts being used in your production stage.

这篇关于来自版本控制的 TFS 2017 发布管理工件文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆