'Can you move the location of azure-pipelines.yaml to another Azure Repository?

he is my scenario => I had an azure repos A containing 3 folders A1 A2 A3, in each folder i had a CI file and a CD file. I wanted to split my repo and reconfigure my pipeline to point to the new repos and keep the some path.

changing the path in the some repos is possible but I was wondering if it's possible to reconfigure an existing pipeline to use a yaml file from another repos ?

Screenshot: enter image description here here I can chose another file but not another file from another repos

Thank you in advance = )



Solution 1:[1]

Sure, you can use templates as described here (https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops).

E.g. you have a YAML Repository called "YAML" containing the file build.yaml and you have the Repository called "UsingYAML" which needs the build.yaml file.

To access the build.yaml in YAML-Repo do the following:

name: 'Pipeline_using_a_template'

steps:
- template: build.yml@YAML # Template reference for build

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Schamal