从多个分支获取源 [英] Get Sources from multiple branches

查看:66
本文介绍了从多个分支获取源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Visual Studio团队服务中配置内部版本定义.是否可以从获取源文件"任务中的特定分支获取源文件.例如,我可以在两个分支中启用CI,即master&开发,但我只能选择母带或在获取资源中进行开发.因此,我现在保留两个构建定义,一个用于主控,另一个用于开发.是否可以仅保留一个构建定义以便于维护.

I am trying to configure build definition in the Visual Studio team services. Is it possible to get the sources from specific branch in Get Sources task. For instance I can enable CI in two branches i.e. master & develop but I can only choose either master or develop in get sources. So I am now keeping two build definition one for master and another for develop. Is it possible to keep only one build definition to easy maintenance.

我正在使用git,但是已经选择了分支(2)时,我却对下面的分支选择(1)感到困惑

I am using git and I am confused with the below branch selection (1) when I have already selected branches (2)

推荐答案

假设您使用的是Git,则选择默认分支.这并不意味着它是该构建定义可以构建的唯一分支.

Assuming you're using Git, you're choosing the default branch. That doesn't mean that it's the only branch that can be built by that build definition.

您可以选择监视CI的分支(在触发器"选项卡上,可以添加多个分支过滤器来表示要在提交时构建的分支),并且在触发构建时会检出相应的分支.您也可以在手动排队构建时选择备用分支.

You can choose which branches to monitor for CI (on the Triggers tab, you can add multiple branch filters to represent the branches you wish to build on commit), and the appropriate branch will be checked out when the build is triggered. You can also choose an alternate branch when manually queuing the build.

如果您使用的是TFVC,则基本上不可能为来自同一构建定义的多个分支配置CI.

If you're using TFVC, it's basically impossible to have CI configured for multiple branches from the same build definition.

这篇关于从多个分支获取源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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