yaml pipline

%3CLINGO-SUB%20id%3D%22lingo-sub-2229529%22%20slang%3D%22en-US%22%3Eyaml%20pipline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2229529%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20creating%20a%20yaml%20pipeline%20%2C%20and%20my%20data%20is%20present%20in%20different%20azure%20git%20repos.%20I%20want%20my%20pipeline%20to%20trigger%20when%20any%20change%20in%20data%20happens%20in%20the%20master%20branch%20of%20any%20repos.%20I%20looked%20through%20the%20documentation%2C%20and%20did%20as%20told%20%2C%20but%20the%20trigger%20is%20not%20working.%20Please%20find%20the%20error%20in%20my%20yml%20pipeline.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2237814%22%20slang%3D%22en-US%22%3ERe%3A%20yaml%20pipline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2237814%22%20slang%3D%22en-US%22%3EAt%20the%20start%20of%20your%20YAML%20file%20you%20can%20put%20that%20keys%3A%3CBR%20%2F%3E%3CBR%20%2F%3Etrigger%3A%3CBR%20%2F%3E-%20master%3CBR%20%2F%3E-%20develop%3CBR%20%2F%3E-%20release*%3CBR%20%2F%3E%3CBR%20%2F%3E(adapting%20with%20your%20case)%2C%20it%20will%20start%20immediately%20when%20a%20change%20is%20commit%20into%20any%20of%20those%20branches%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20have%20also%20this%20following%20part%20to%20schedule%20your%20pipeline%3A%3CBR%20%2F%3Eschedules%3A%3CBR%20%2F%3E-%20cron%3A%20%220%204%20*%20*%20*%22%3CBR%20%2F%3EdisplayName%3A%20Each%20Day%204AM%3CBR%20%2F%3Ebranches%3A%3CBR%20%2F%3Einclude%3A%3CBR%20%2F%3E-%20develop%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20take%20a%20look%20in%20YAML%20options%3A%3CBR%20%2F%3E-%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fpipelines%2Frepos%2Fazure-repos-git%3Fview%3Dazure-devops%26amp%3Btabs%3Dyaml%23ci-triggers%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fpipelines%2Frepos%2Fazure-repos-git%3Fview%3Dazure-devops%26amp%3Btabs%3Dyaml%23ci-triggers%3C%2FA%3E%3CBR%20%2F%3E-%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fpipelines%2Fprocess%2Fscheduled-triggers%3Fview%3Dazure-devops%26amp%3Btabs%3Dyaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fpipelines%2Fprocess%2Fscheduled-triggers%3Fview%3Dazure-devops%26amp%3Btabs%3Dyaml%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EFab%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2243662%22%20slang%3D%22en-US%22%3ERe%3A%20yaml%20pipline%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2243662%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F41125%22%20target%3D%22_blank%22%3E%40Fabrice%20Romelard%3C%2FA%3E%26nbsp%3B%20thanks%20for%20the%20suggestion%2C%20but%20i%20tried%20and%20still%20it%20is%20not%20getting%20triggered.%20Is%20there%20anything%20else%20that%20i%20should%20keep%20in%20mind%20while%20trying%20it%20.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am creating a yaml pipeline , and my data is present in different azure git repos. I want my pipeline to trigger when any change in data happens in the master branch of any repos. I looked through the documentation, and did as told , but the trigger is not working. Please find the error in my yml pipeline.

4 Replies
At the start of your YAML file you can put that keys:

trigger:
- master
- develop
- release*

(adapting with your case), it will start immediately when a change is commit into any of those branches

You have also this following part to schedule your pipeline:
schedules:
- cron: "0 4 * * *"
displayName: Each Day 4AM
branches:
include:
- develop

So take a look in YAML options:
- https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs...
- https://docs.microsoft.com/en-us/azure/devops/pipelines/process/scheduled-triggers?view=azure-devops...

Fab

@Fabrice Romelard  thanks for the suggestion, but i tried and still it is not getting triggered. Is there anything else that i should keep in mind while trying it .

Hello,

normally you would only have one repo linked to a pipeline, so it might be fiddly to get this to work.

I think you can do it by referencing each repo using the Resources feature:
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=sch...

This can also have triggers in these elements, so they can trigger the pipelines.
You can then acces the repo code by choosing it in the download.
The trick will be using the if statements maybe to choose which one to using.
Thanks for the update, but still i am still not able to get the triggers , for the branch changes. My requirement is actually , if there is any changes in any of the defined branchs of the repos, my pipeline needs to be triggered