VSTS版本管理:按工件来源上的分支进行过滤 [英] VSTS Release Management: filter by branch on artifact source

查看:90
本文介绍了VSTS版本管理:按工件来源上的分支进行过滤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VSTS构建来运行CI构建.对于我的所有git分支(母版,开发版,功能等),此构建定义与相同相同.

I am using VSTS build to run a CI build. This build definition is the same for all my git branches (master, develop, features, etc).

我现在正在尝试使用VSTS版本管理来实施部署管道.我计划有两个不同的发行版定义.一个用于功能分支,另一个用于其他重要分支,例如developer和master.功能分支的发布定义将更加轻量级.

I am now trying to implement a deployment pipeline using VSTS release management. I plan to have two distinct release definitions. One for feature branches and one for the more important branches like develop and master. The release definition for feature branches would be more lightweight.

我认为这是非常基本且常见的.实际上,这几乎是Microsoft 中记录的内容.版本管理的典型用例.

I think this is pretty basic and usual. In fact, that's pretty much what is documented in Microsoft's typical use case for Release Management.

对于这两个管道,我都希望将它们配置为使用连续部署"触发器自动启动.选择此触发器时,必须选择一个工件源.

For both of these pipelines, I want to configure them to start automatically using the 'Continuous Deployment' trigger. When I select this trigger, I must select an artifact source.

不幸的是,工件源采用来自给定构建定义(我的CI构建)的所有工件(不考虑分支).由于我对所有分支都使用相同的CI构建定义,因此似乎无法在连续部署"中配置两个发布管道,而仍将相同的构建定义用作工件源.

Unfortunately, an artifact source takes all artifacts (regardless of the branch) coming from a given build definition (my CI build). Since I use the same CI build definition for all my branches, it looks like I can't configure my two release pipelines in 'Continuous Deployment' and still use the same build definition as an artifact source.

任何人都知道如何为多个发行版定义共享相同的构建定义,但只为特定分支启动发行版吗?定义人工制品源时,有人知道按分支进行过滤的方法吗?

Anybody knows how to share the same build definition for multiple release definitions but only start a release for a specific branch? Anybody knows of a way to filter by branch when we define an artifact source?

推荐答案

配置分支特定的发行版部署

  1. 转到VSTS中的发布管理
  2. 转到版本的定义
  3. 转到标签触发器
  4. 添加持续部署触发器
  5. 您可以在此处选择特定分支(用于分支)

  • 此功能在VSTS中可用
  • 在TFS本地版本中,它应该在Server 2017.1版本中可用,但在2018.1版本中仍然不可用

这篇关于VSTS版本管理:按工件来源上的分支进行过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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