'Can i update a YML file automatically in another repo when I make a change
There are 2 REPOS - REPO1 and REPO2
I have a repo called REPO1 and in there is a yaml file eg pipleines.yml which runs some tasks to do some tests. The devs use REPO1, when the DEVS update this file in their Main Branch in REPOA is there a way Azure Devops can automatically copy the file into REPOB ?
Solution 1:[1]
you dont need to copy it, you can extend your pipeline or template in Repo2 from Repo1. refer to this page for more details
Repo 1 will have something like this
# Repo: Contoso/BuildTemplates
# File: common.yml
parameters:
- name: 'vmImage'
  default: 'ubuntu 16.04'
  type: string
jobs:
- job: Build
  pool:
    vmImage: ${{ parameters.vmImage }}
  steps:
  - script: npm install
  - script: npm test
and Repo2 will do this
# Repo: Contoso/LinuxProduct
# File: azure-pipelines.yml
resources:
  repositories:
    - repository: templates
      type: github
      name: Contoso/BuildTemplates
jobs:
- template: common.yml@templates  # Template reference
Or you could use in any pipeline or stage
extends: template/your-template@other-repo
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 | Gurpreet | 
