✨ Question of the day ✨: Would would you use multiple repositories in Pipelines for? GET EXCLUSIVE CONTENT: Join my Patreon: www.patreon.com/CoderDave SUPPORT THE CHANNEL : Buy me a coffee: www.buymeacoffee.com/CoderDave PayPal me donation: paypal.me/dabenveg
Thank you so much for this video. I have a whole bunch of common PowerShell scripts in one repo that I wanted to share among multiple build pipelines. With this technique, I can finally bring in the PS scripts for building my applications.
HI. My scenario has one github repos with yaml pipeline and many others github repos to be triggered. It is not working now. I tried many ways and when I commit into other repos defined into my pipeline, it does not trigger pipeline.
Hey there, unfortunately triggers for multiple repos only work for Azure DevOps Repos 😕 I think I’ve mentioned it in the video ad well, but here you have the official docs: docs.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#triggers
Let’s say i have some 30-40 repos, I can’t just add all repo names right? Is there a way i can add these repo configurations in separate file and point the file in the pipeline definition?
When you add the trigger to the repo under resources, you can also specify the branch. I’d you don’t, it will trigger from the default branch of that repo
Hi CoderDave, I have written pipeline to run some compliance. And place yaml file in compliance repo. Now I have configured branch police for default branch at project level to run compliance pipeline for every PR of all the repose in project. But I am not finding to checkout the repo which triggered the build. Please suggest
Hi, I have a question. once the pipeline is deployed how will I know if the deployment was successful and the pods are running? can I get a status message in the pipeline is completed and the pods a running or failed.
Some Tasks do wait for a result state, so in that case if the deployment is not successful the Job fails. Some others, however, don't have that... and this is the case of the kubernetes deployment, because the whole process is asynchronous... The best practice here would be to kick off the deployment in the pipeline, and then have a Gate in place that checks for the success/failure (and also for example if all the pods are running, etc)
Great video! May I ask you how to sync Azur repo with github repo by Azure pipeline? We are doing project and we are using github as our main repository, but would like to have a repo copy in Azure. So is there a way to automatically update Azure repo everytime github repo gets new commit?
Hey, thanks!. Unfortunately tehre is nothing out of the box. You’d need to use some git command in your Pipeline or Actions. If you do it in GitHub Actions, it would be easier to have a “proper sync”. You can get the last commit(s) and push them to AzDO. If you wanna do it in Azure Pipelines, I think the only thing to do is to clone the repo locally in the Pipelines Agent and do a `git push --prune` to the local one. Hope this helps.
Hi, I was trying out this video, I was creating yaml script in azure devops portal, after selecting the repository from the same project, it was not showing suggestions(type, name, ref) but instead it was showing trigger and endpoint. Could you tell me what should I do
Hi, may you show how to trigger multiple repositories, I mean I have a repository that has all the templates for the pipeline, I created the pipeline using the existing YAML in that repository, I want to trigger multiple repositories from that single pipeline, but only triggers the self repository but not the other repositories... I have everything as the documentation says but the triggers for the other repos are not working ☹
All my repos are named Something.AppName or Something.Data.PackageName. Just discovered "- repository: " Name has a regex of ^[_a-zA-Z0-9]$ making me very :-(
✨ Question of the day ✨: Would would you use multiple repositories in Pipelines for?
GET EXCLUSIVE CONTENT:
Join my Patreon: www.patreon.com/CoderDave
SUPPORT THE CHANNEL :
Buy me a coffee: www.buymeacoffee.com/CoderDave
PayPal me donation: paypal.me/dabenveg
Thank you so much for this video.
I have a whole bunch of common PowerShell scripts in one repo
that I wanted to share among multiple build pipelines.
With this technique, I can finally bring in the PS scripts for building my applications.
That’s a pretty good use case indeed
HI. My scenario has one github repos with yaml pipeline and many others github repos to be triggered. It is not working now. I tried many ways and when I commit into other repos defined into my pipeline, it does not trigger pipeline.
Hey there, unfortunately triggers for multiple repos only work for Azure DevOps Repos 😕
I think I’ve mentioned it in the video ad well, but here you have the official docs: docs.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#triggers
Nice video. Actually solved our use-case
Glad to hear it!
Let’s say i have some 30-40 repos, I can’t just add all repo names right? Is there a way i can add these repo configurations in separate file and point the file in the pipeline definition?
This video is about checking out source code from other repos. But Can you trigger your pipeline from another repository?
Yes you can, the video covers that as well... check at the minute 2:06
can we add trigger based on include path & exclude path for each repo !
Hi!
I have a question.
If my pipeline has a trigger from it's resource repository, which branch of my pipeline wil be triggered?
When you add the trigger to the repo under resources, you can also specify the branch. I’d you don’t, it will trigger from the default branch of that repo
Great tip, thanks, I wonder if you have a way to make it work with schedules trigger on one of the repositories. I was not able to make it work.
I think it is possible to have that scheduled only on the repo which contains the YAML file of the pipeline
@@CoderDave Yes, I couldn't find a way other than this one, thanks for your answer and have a nice day
Hi CoderDave,
I have written pipeline to run some compliance. And place yaml file in compliance repo.
Now I have configured branch police for default branch at project level to run compliance pipeline for every PR of all the repose in project.
But I am not finding to checkout the repo which triggered the build.
Please suggest
Sorry, I missed your comment. I am not sure I understand your question tho... 🤔
Grazie Davide!!
Prego 😀
can we do it for classic pipelines ?
No, this is a feature of YAML Pipelines
Hi, I have a question. once the pipeline is deployed how will I know if the deployment was successful and the pods are running? can I get a status message in the pipeline is completed and the pods a running or failed.
Some Tasks do wait for a result state, so in that case if the deployment is not successful the Job fails. Some others, however, don't have that... and this is the case of the kubernetes deployment, because the whole process is asynchronous... The best practice here would be to kick off the deployment in the pipeline, and then have a Gate in place that checks for the success/failure (and also for example if all the pods are running, etc)
Great video!
May I ask you how to sync Azur repo with github repo by Azure pipeline?
We are doing project and we are using github as our main repository, but would like to have a repo copy in Azure. So is there a way to automatically update Azure repo everytime github repo gets new commit?
Hey, thanks!. Unfortunately tehre is nothing out of the box. You’d need to use some git command in your Pipeline or Actions.
If you do it in GitHub Actions, it would be easier to have a “proper sync”. You can get the last commit(s) and push them to AzDO.
If you wanna do it in Azure Pipelines, I think the only thing to do is to clone the repo locally in the Pipelines Agent and do a `git push --prune` to the local one.
Hope this helps.
Do you have any Udemy course for azure CI/CD?
Hey there, no I don't. So far all my video content is here on TH-cam :)
Hi, I was trying out this video, I was creating yaml script in azure devops portal, after selecting the repository from the same project, it was not showing suggestions(type, name, ref) but instead it was showing trigger and endpoint. Could you tell me what should I do
instead of yaml pipeline, can we use classic pipeline to trigger multiple azure repo's?
Unfortunately not, multi-repo trigger is a feature only of YAML pipelines
Hi! Does this work if the pipeline is triggered from a Pull Request build?
Yes you can trigger the pipeline from a PR as well, but for the “other” repositories it will be triggered only on commits/push/merge
Hi, may you show how to trigger multiple repositories, I mean I have a repository that has all the templates for the pipeline, I created the pipeline using the existing YAML in that repository, I want to trigger multiple repositories from that single pipeline, but only triggers the self repository but not the other repositories... I have everything as the documentation says but the triggers for the other repos are not working ☹
My bad, I didn't put the policy to the branch in the section Build Validation
But I would like to know how to get which repo triggers the pipeline with a PR in order to checkout only that repo... Thank you!
You get that info in the Build.Repository variable… specifically, you can use Build.Repository.ID, Build.Repository.Name, and Build.Repository.Uri
Can we creat a pipeline on specific folder in a particular branch. Anyone please help
You can, but to be able to run it also needs to be on the default branch
Thank you@CoderDave
All my repos are named Something.AppName or Something.Data.PackageName. Just discovered "- repository: " Name has a regex of ^[_a-zA-Z0-9]$ making me very :-(