【问题标题】:Azure DevOps - How do I create a build pipeline using more than one repository?Azure DevOps - 如何使用多个存储库创建构建管道?
【发布时间】:2019-05-15 14:20:55
【问题描述】:

创建新的构建管道时,第一步是选择存储库。

我想在一个存储库上为 Java 项目创建构建,但还包括驻留在不同存储库中的导入和配置(两者都是 Azure Repos Git)。

这可能吗?

【问题讨论】:

    标签: git azure-devops azure-pipelines


    【解决方案1】:

    更新:微软添加了此功能(在 Sprint 161 中),如果您使用 YAML 管道,您可以通过这种方式克隆多个存储库:

    resources:
    repositories:
     - repository: tools
       name: tools
       type: git
    
    steps:
    - checkout: self
    - checkout: tools
    

    更多信息您可以找到here


    (旧答案)

    目前您不能在“获取源”阶段指定多个存储库。

    有一个关于它的Feature Request,状态是On Roadmap

    你有两个选择:

    1) Git 解决方案 - 在第一个存储库中创建第二个存储库为 submodule。然后在“Get Sources”中勾选checkout submodules复选框,然后Azure DevOps会将这两个存储库引入代理。

    2) Azure DevOps 解决方案 - 添加命令行或 PowerShell 任务,将第二个存储库带到带有git clone second-repo-url 的代理。

    【讨论】:

    • 您好,当我运行git clone <url> 时。它显示fatal: could not read Username for 'https://abc.visualstudio.com': terminal prompts disabled。如何解决这个问题
    猜你喜欢
    • 2023-03-14
    • 2021-01-21
    • 1970-01-01
    • 2019-05-14
    • 1970-01-01
    • 1970-01-01
    • 2020-08-26
    • 1970-01-01
    • 2022-11-24
    相关资源
    最近更新 更多