I am trying to use several job/steps templates from multiple repositories. I have the following dependencies in my YAML pipeline:
pipeline.yaml@RepoA -> template1.yaml@RepoB -> template2.yaml@RepoC
It looks like Azure DevOps only supports referencing templates only one level deep.
This is the sample code I am using:
# pipeline.yaml@RepoA
resources:
repositories:
- repository: RepoB
type: Git
name: RepoB
extends:
template: Build/YAML/Jobs/test-sdk.yaml@RepoB
# Build/YAML/Jobs/test-sdk.yaml@RepoB
resources:
repositories:
- repository: RepoC
type: Git
name: RepoC
jobs:
- job: AnotherJob
steps:
- template: Common/Steps/Initialize/ShowPackageVariables_01.yaml@RepoC
The above code sample throws an error while parsing the template:
/Build/YAML/Jobs/test-sdk.yaml@RepoB (Line: 23, Col: 15): Templates in other repositories may not specify a repository source when referencing another template. The template reference 'Common/Steps/Initialize/ShowPackageVariables_01.yaml@RepoC' is not allowed.
Any ideas how to solve this issue would be appreciated.