git - Team Foundation Server 2013 触发器构建 pull 请求

标签 git visual-studio-2013 tfsbuild pull-request

如何配置 TFS 为每个 pull 请求(创建和更新时)运行构建(这是 CI 构建)。

我想要的场景是,当开发人员完成其工作并将分支推送到 GIT(在 TFS 上)时,最好检查构建是否实际编译以及所有测试是否通过。

我可以为现有的分支创建一个构建并监视那里的更改,但如何为稍后创建的分支配置它,以及如何在创建 pull 请求时触发此构建。

最佳答案

您可以在分支名称中使用通配符。因此,如果您在服务器上使用命名模式(例如“pr-myrequest”)创建 pull 请求分支,则可以将其添加到服务器的 CI 设置中:

Wildcard in Branch names

关于这个主题有一些简介in the guidance on MSDN .

enter image description here Git: Specify the repository and the branches that contain the files that your build process requires.

enter image description here Tip


In the list of branches monitored for continuous integration (CI) and rolling builds, you can use wildcards. For example, you could specify refs/heads/feature* to monitor the refs/heads/featureA and refs/heads/featureB branches.

您可以使用 /在分支命名中,可以提供一种清晰的方式来命名分支。这将导致:refs/heads/pr/*作为包含,您的分支名称必须以 pr/branchname 开头。自动构建。

关于git - Team Foundation Server 2013 触发器构建 pull 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28897978/

相关文章:

linux - 自动将日期添加到 git 提交消息

visual-studio-2013 - Visual Studio 2013 安装程序项目 - 32 位操作系统中的错误

visual-studio-2010 - 是否可以在同一台计算机上安装两个不同版本的 Visual Studio?

tfsbuild - 切换到并行构建不同风格后,我们会间歇性地看到由于 CreateLabel 失败而导致的构建失败

visual-studio-2017 - 无法找到类型 [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]

git - 即使没有更改存储库,Jenkins 也会持续在 Windows slave 上构建

Git - 查找特定的 git 提交哈希 ID 并将其用作 git checkout 的 <start-point>

github 如何在新的 git 分支 gh-pages 中包含来自 master 的文件

c++ - linux + Visual Studio 2013 + VisualGDB, undefined reference 'dlopen'

TFS 构建服务向导在 'Edit collection-level information' 权限设置为允许时失败