我在外部存储库中构建了一个模板。我希望这个管道读取位于同一外部存储库中的文件,但我所能做的就是从调用模板的存储库中读取文件,而不是从具有模板的外部存储库中读取文件。
有人知道怎么做吗?
在我的测试中,您可以将下面的代码添加到您的管道yaml文件或模板文件中,它将检出模板所在的目标repo
resources:
repositories:
- repository: targetRepo
type: git
name: targetRepo
ref: xxx
jobs:
- job:
steps:
- checkout: targetRepo