从多个存储库构建 VSTS [英] VSTS build from multiple repositories

查看:22
本文介绍了从多个存储库构建 VSTS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个存储库 - 一个在 TFVC 中,另一个在 Git 中.将它们分开有特定的技术原因.

I have two repositories - one in TFVC and another in Git. There are specific technical reasons for keeping them separate.

TFVC 中的代码构建在私有构建代理上,而 Git 中的代码构建在托管代理上.所以目前我有两个独立的构建,它们的结果被一起部署在一个发布定义中.

The code in TFVC is built on a private build agent and the code in Git is built on a hosted agent. So currently I have two independent builds and the outcomes of them are deployed together in a release definition.

我正在考虑创建能够从两个存储库中获取源代码的构建,以便我可以管理一个构建定义.

I am looking at creating builds that may be able to get the source from both the repositories so that I have a single build definition to manage.

有没有办法做到这一点?

Is there a way to achieve this?

推荐答案

目前,无法在获取源步骤中指定多个存储库.并且有用户声音 允许 TFS 构建依赖于多个存储库 建议类似的功能,您可以投票和跟进.

For now, there is no way to specify multiple repositories in Get sources step. And there has an user voice Allow TFS build to depend on multiple repositories which suggests similar feature, you can vote and follow up.

目前的解决方法是手动从其他存储库获取文件.

比如,如果你在Get sources步骤中指定了TFVC repo,那么你可以在任务的开头添加一个PowerShell任务,通过git clone <克隆另一个git repo;repo URL>

Such as, if you specify TFVC repo in Get sources step, then you can add a PowerShell task at the beginning of the tasks, and clone the other git repo by git clone <repo URL> etc.

这篇关于从多个存储库构建 VSTS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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