不同Git Repo中的源代码和YAML文件 [英] Source Code and YAML file in a different Git Repo

查看:135
本文介绍了不同Git Repo中的源代码和YAML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这就是卡住的地方.

一个github存储库A提供了只读访问权限,我正试图在此之上建立一个Azure Devops管道.

A github repository A provides read only access and i am trying to build a azure devops pipeline on top of this.

由于需要将YAML文件写入同一存储库,因此在尝试将其保存到只读位置时出现错误,这是预期的.我知道可以在git repo内部更改YAML文件的位置,但是我要实现的是将YAML文件保存到repo B中,后者从Repo A构建代码.

Since the YAML file needs to be written into the same repository , i get an error while i try save to a read only location , which is expected. i know the location of the YAML file can be changed inside the git repo but what i am trying to implement is save YAML file into repo B which builds code from Repo A.

YAML文件应构建回购A.

The YAML file should do a build of repo A.

我找不到与此相关的任何文档,因此可能无法实现,但是在任何地方都提到了吗?

i couldn't find any documentation on this and feel this might not be possible , but is that mention anywhere ?

推荐答案

我要实现的是将YAML文件保存到存储库B中 从回购A构建代码

what i am trying to implement is save YAML file into repo B which builds code from Repo A

对于此问题,您可以在存储在repoB中的yaml文件中检出repo A.

For this issue , you can checkout repo A in the yaml file stored in repoB.

管道通常依赖于多个存储库.您可以具有包含源,工具,脚本或构建代码所需的其他项目的不同存储库.通过在管道中使用多个checkout步骤,除了用于存储YAML管道的存储库之外,您还可以获取并检出其他存储库.

Pipelines often rely on multiple repositories. You can have different repositories with source, tools, scripts, or other items that you need to build your code. By using multiple checkout steps in your pipeline, you can fetch and check out other repositories in addition to the one you use to store your YAML pipeline.

resources:
  repositories:
  - repository: GitHubRepoA # The name used to reference this repository in the checkout step
    type: github
    endpoint: MyGitHubServiceConnection
    name: MyGitHubOrgOrUser/MyGitHubRepo

这是 查看全文

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