Trigger Azure Pipelines From Multiple Repositories | Azure DevOps Pipeline

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2025

ความคิดเห็น • 41

  • @CoderDave
    @CoderDave  3 ปีที่แล้ว

    ✨ 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

    • @alexintel8029
      @alexintel8029 3 ปีที่แล้ว

      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.

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      That’s a pretty good use case indeed

  • @marncosta
    @marncosta 2 ปีที่แล้ว +2

    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.

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      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

  • @akashkarve1991
    @akashkarve1991 11 หลายเดือนก่อน

    Nice video. Actually solved our use-case

    • @CoderDave
      @CoderDave  11 หลายเดือนก่อน

      Glad to hear it!

  • @rohithkotichukkala3327
    @rohithkotichukkala3327 5 วันที่ผ่านมา

    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?

  • @Nam-im7tj
    @Nam-im7tj 3 ปีที่แล้ว +2

    This video is about checking out source code from other repos. But Can you trigger your pipeline from another repository?

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      Yes you can, the video covers that as well... check at the minute 2:06

  • @Amit_shr6779
    @Amit_shr6779 5 หลายเดือนก่อน

    can we add trigger based on include path & exclude path for each repo !

  • @illiapeknevych156
    @illiapeknevych156 3 ปีที่แล้ว +3

    Hi!
    I have a question.
    If my pipeline has a trigger from it's resource repository, which branch of my pipeline wil be triggered?

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      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

  • @nolamusic270
    @nolamusic270 2 ปีที่แล้ว +1

    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.

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      I think it is possible to have that scheduled only on the repo which contains the YAML file of the pipeline

    • @nolamusic270
      @nolamusic270 2 ปีที่แล้ว +1

      @@CoderDave Yes, I couldn't find a way other than this one, thanks for your answer and have a nice day

  • @SuccessYadhnya
    @SuccessYadhnya 4 หลายเดือนก่อน

    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

    • @CoderDave
      @CoderDave  3 หลายเดือนก่อน

      Sorry, I missed your comment. I am not sure I understand your question tho... 🤔

  • @JonathanBuffoni
    @JonathanBuffoni 2 ปีที่แล้ว

    Grazie Davide!!

  • @sounavapal762
    @sounavapal762 ปีที่แล้ว +1

    can we do it for classic pipelines ?

    • @CoderDave
      @CoderDave  ปีที่แล้ว

      No, this is a feature of YAML Pipelines

  • @yateeshsugur6305
    @yateeshsugur6305 3 ปีที่แล้ว +1

    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.

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      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)

  • @manyayao8103
    @manyayao8103 2 ปีที่แล้ว +1

    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?

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      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.

  • @viswaviswa8616
    @viswaviswa8616 2 ปีที่แล้ว +1

    Do you have any Udemy course for azure CI/CD?

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว +3

      Hey there, no I don't. So far all my video content is here on TH-cam :)

  • @AkshayKumar-re3bf
    @AkshayKumar-re3bf 2 ปีที่แล้ว

    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

  • @gopinath-kr7kk
    @gopinath-kr7kk 2 ปีที่แล้ว

    instead of yaml pipeline, can we use classic pipeline to trigger multiple azure repo's?

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      Unfortunately not, multi-repo trigger is a feature only of YAML pipelines

  • @Zefiirus
    @Zefiirus 3 ปีที่แล้ว +1

    Hi! Does this work if the pipeline is triggered from a Pull Request build?

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      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

  • @juanchovelez6460
    @juanchovelez6460 3 ปีที่แล้ว

    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 ☹

    • @juanchovelez6460
      @juanchovelez6460 3 ปีที่แล้ว

      My bad, I didn't put the policy to the branch in the section Build Validation

    • @juanchovelez6460
      @juanchovelez6460 3 ปีที่แล้ว

      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!

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      You get that info in the Build.Repository variable… specifically, you can use Build.Repository.ID, Build.Repository.Name, and Build.Repository.Uri

  • @gangadharnaidu3042
    @gangadharnaidu3042 2 ปีที่แล้ว

    Can we creat a pipeline on specific folder in a particular branch. Anyone please help

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      You can, but to be able to run it also needs to be on the default branch

    • @gangadharnaidu3042
      @gangadharnaidu3042 2 ปีที่แล้ว

      Thank you@CoderDave

  • @alexmac513
    @alexmac513 ปีที่แล้ว

    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 :-(