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

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

问题描述

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

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

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

有没有办法做到这一点?

解决方案

目前,尚无法在获取源代码"步骤中指定多个存储库. 并且有用户声音允许TFS构建依赖于多个存储库,这暗示了相似的功能,您可以投票并采取后续行动.

目前的解决方法是手动从另一个存储库中获取文件.

例如,如果您在获取源代码"步骤中指定TFVC repo,则可以在任务的开头添加 PowerShell任务,并通过git clone <repo URL>等克隆另一个git repo./p>

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

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?

解决方案

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.

The workaround for now is manually get the files from the other repo.

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天全站免登陆