Trigger Pipeline from another Pipeline in Azure DevOps

Поділитися
Вставка
  • Опубліковано 31 лип 2024
  • Source code here: github.com/HoussemDellai/Trig...
    Follow me on Twitter for more content: / houssemdellai
  • Наука та технологія

КОМЕНТАРІ • 33

  • @bromatofiel
    @bromatofiel Рік тому

    Thanks a lot Houssem, your example was way more concrete than the Azure documentation !

  • @feol8132
    @feol8132 3 місяці тому

    Thank you very much! Saved me a lot of time and effort! Keep up and good luck!

  • @blazorax
    @blazorax Рік тому

    Mate, thank you so much for this demo - it is so much better than the Azure doco. Once again, thx heaps.🙏

  • @casperdijkstra939
    @casperdijkstra939 2 роки тому

    Useful video, thanks Houssem!

  • @ksdvishnukumar
    @ksdvishnukumar Рік тому +3

    Hi @Dave and all,
    I have question on pipeline resource trigger,
    I have 3 branches in the single repo in the project.
    Repo name : test-repo
    Branch name's :
    - vishnu/branch1
    - branch1.yaml
    - vishnu/branch2
    - branch2.yaml
    - vishnu/branch3
    - child.yaml
    Pipelines created for all the 3 pipelines named as follows
    poc_branch1 (branch1.yaml)
    poc_branch2 (branch2.yaml)
    poc_child (child.yaml)
    child yaml contains the resource trigger like below
    resources:
    pipelines:
    - pipeline: poc_branch1
    source: poc_branch1 # name of the pipeline that produces an artifact.
    trigger:
    branches:
    include:
    - refs/heads/vishnu/branch1
    - pipeline: poc_branch2
    source: poc_branch2 # name of the pipeline that produces an artifact.
    trigger:
    branches:
    include:
    - refs/heads/vishnu/branch2
    # -------------------------------------------------------------------------
    trigger: none
    pr: none
    stages:
    - stage: Consume_Artifact
    displayName: Consume Artifact From Main Pipeline
    jobs:
    - job: Consume
    displayName: Consume
    steps:
    - task: PowerShell@2
    displayName: 'Extracting the Triggered Pipeline alias'
    inputs:
    targetType: inline
    script: |
    Write-output "This pipeline has been triggered by: $(Resources.TriggeringAlias)"
    Ideally poc_child pipeliene should be triggered once the poc_branch1 or poc_branch2 pipelines gets completed. But its not happening.
    What might be reason?
    If I keep child.yaml in poc_branch1 where branch1.yaml file is exists. And point the child.yaml to poc_child pipeline, the trigger works.
    Appreciate for the inputs.

  • @Imdarkk
    @Imdarkk Рік тому

    Thanks! That was very helpful

  • @Nam-im7tj
    @Nam-im7tj Рік тому +1

    Hi, Thanks for sharing this, but I wonder How can we trigger the second pipeline when the first pipeline has failed?

  • @estebanguetoarroyo1328
    @estebanguetoarroyo1328 2 роки тому

    Thank you very much for the video, how I can do the same but with release pipelines?? I would like to run a release pipeline and then run another release pipeline

  • @maheshk6507
    @maheshk6507 7 місяців тому

    Hi Dave
    I have a template file in repository 'A".
    I am running pipeline in repository in 'B" through PR ..But when i initiated the PR all pipelines are executing.
    I don't want to execute all pipelines in the same REPO, with only one pipeline when i make any changes on perticular pipeline. Please suggest

  • @sergeykulinich5086
    @sergeykulinich5086 2 роки тому

    Thanks!

  • @dhinagaran6429
    @dhinagaran6429 Рік тому +1

    I got a error Resource pipeline input not valid

  • @PDuimelaar
    @PDuimelaar 2 роки тому

    Im wondering. we have pipeline with different stages. I want another pipeline, my e2e tests, to be triggered after tests stage has been deployed. How to configure that ?

  • @TellaTrix
    @TellaTrix 2 роки тому

    Very usefull content so far, Could you please create more video on this with real life scenario ?

  • @ramgosavi9708
    @ramgosavi9708 5 місяців тому

    Nice Tutorial, but getting error while validation of template "pipeline resource input must be valid" at project keyword, can you please suggest here.

  • @EngineeringVignettes
    @EngineeringVignettes 2 роки тому

    Thanks for the video. It assures me that I have my inter-pipeline triggering (resources) setup correctly.
    However when I tried to ALSO trigger my "downstream" pipeline from a local commit on that same pipeline, then that action somehow corrupted my "upstream" pipeline in another project! Microsoft support has recently just fixed the problem in the "upstream" pipeline and it's back (was not showing the Runs, some SQL issue?)
    My question that I am struggling with (that I have found ZERO documentation on) is how to have a "downstream" pipeline get triggered by multiple trigger sources: (1) "upstream" pipeline (in a different project)
    OR
    (2) local commit on the "downstream" pipeline.
    -
    I am curious if you know the answer to that or have tried testing something like this previously. Thanks for posting the video.
    Cheers,

  • @driverafontan
    @driverafontan 2 роки тому +1

    Thanks have read about templates but now I see, they are like task groups in DevOps server 2019 right? You just can call them. Can you pass variables too?

    • @HoussemDellai
      @HoussemDellai  2 роки тому

      Task groups are also another way to share a pipeline. And yes you can pass variables.

  • @ravinandankaushal3309
    @ravinandankaushal3309 2 місяці тому

    If my first pipeline is not in main branch let say branch 1 and the second one in branch 2 , will this still work because for me it’s not getting triggered in this scenario

  • @vimalprasath679
    @vimalprasath679 5 днів тому

    Hey Houssem, if the code is in a different repository and on a different branch, how can we trigger a pipeline from another pipeline?

  • @dhinagaran6429
    @dhinagaran6429 Рік тому +1

    I have one doubt

  • @JeffZiegler76
    @JeffZiegler76 2 роки тому

    But how do you call another Pipeline in another repo? error: /....yml: File /... not found in repository

  • @Yaabalhassan1214
    @Yaabalhassan1214 Рік тому

    I want to trigger my second pipeline only when a certain condition is met. For example, if variable “x” in pipeline 1 is = 1 then trigger the second pipeline. Is that possible. The main idea is I don’t want to trigger pipeline 2 every time pipeline 1 runs, I only want to do it in a specific case of pipeline 1

    • @maheshk6507
      @maheshk6507 7 місяців тому

      Did you get solution for this . Please provide i am also looking for the same

  • @kirankumar8938
    @kirankumar8938 Рік тому

    @Houssem, I have a question. I wanted to trigger the pipeline after every stage. Currently, I have four stages(DEV, QA, UAT, PROD) in a single pipeline. But the code is working after the all stages. Please suggest me,

    • @user-id6ir1jk1y
      @user-id6ir1jk1y 11 місяців тому +1

      add the template step at the end of each stage as the last job

  • @PR-hf7xd
    @PR-hf7xd 2 роки тому +2

    how can we trigger a release pipeline from another release pipeline?

    • @MagoDeOZner
      @MagoDeOZner 2 роки тому

      I have the same question

    • @ZubairPlays10
      @ZubairPlays10 2 роки тому

      @@MagoDeOZner Same anyone found a solution?

  • @sounavapal762
    @sounavapal762 Рік тому

    Is it also applicable for classical pipelines ?

  • @haydenrandolph3896
    @haydenrandolph3896 Рік тому

    the pipeline resource is not being documented anywhere. where / when is this being defined?

  • @MrSandshadow
    @MrSandshadow Рік тому

    I think you confused templating parts of pipeline with triggering separate successor pipeline... Good job on the resource trigger though :)

  • @Vibestr
    @Vibestr Рік тому

    The pipeline it generated was called Second-Pipeline-yaml but you named it "previous-pipeline-trigger" at 2:08. Where does the name Second-Piepline-yaml come from then?