从多个分支获取源

编程入门 行业动态 更新时间:2024-10-26 16:29:51
本文介绍了从多个分支获取源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试在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.

更多推荐

从多个分支获取源

本文发布于:2023-11-12 11:37:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1581395.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   分支

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!