Trigger Pipeline from another Pipeline in Azure DevOps

Sdílet
Vložit
  • čas přidán 15. 09. 2021
  • Source code here: github.com/HoussemDellai/Trig...
    Follow me on Twitter for more content: / houssemdellai
  • Věda a technologie

Komentáře • 33

  • @bromatofiel
    @bromatofiel Před rokem

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

  • @feol8132
    @feol8132 Před 3 měsíci

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

  • @casperdijkstra939
    @casperdijkstra939 Před 2 lety

    Useful video, thanks Houssem!

  • @blazorax
    @blazorax Před rokem

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

  • @Nam-im7tj
    @Nam-im7tj Před rokem +1

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

  • @estebanguetoarroyo1328

    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

  • @ksdvishnukumar
    @ksdvishnukumar Před rokem +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.

  • @TellaTrix
    @TellaTrix Před 2 lety

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

  • @Imdarkk
    @Imdarkk Před rokem

    Thanks! That was very helpful

  • @EngineeringVignettes
    @EngineeringVignettes Před 2 lety

    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,

  • @PDuimelaar
    @PDuimelaar Před 2 lety

    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 ?

  • @dhinagaran6429
    @dhinagaran6429 Před rokem +1

    I got a error Resource pipeline input not valid

  • @driverafontan
    @driverafontan Před 2 lety +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  Před 2 lety

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

  • @ravinandankaushal3309
    @ravinandankaushal3309 Před 2 měsíci

    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

  • @sergeykulinich5086
    @sergeykulinich5086 Před 2 lety

    Thanks!

  • @sounavapal762
    @sounavapal762 Před rokem

    Is it also applicable for classical pipelines ?

  • @maheshk6507
    @maheshk6507 Před 7 měsíci

    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

  • @JeffZiegler76
    @JeffZiegler76 Před 2 lety

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

  • @ramgosavi9708
    @ramgosavi9708 Před 5 měsíci

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

  • @vimalprasath679
    @vimalprasath679 Před 4 hodinami

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

  • @Yaabalhassan1214
    @Yaabalhassan1214 Před rokem

    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 Před 7 měsíci

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

  • @dhinagaran6429
    @dhinagaran6429 Před rokem +1

    I have one doubt

  • @PR-hf7xd
    @PR-hf7xd Před 2 lety +2

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

  • @haydenrandolph3896
    @haydenrandolph3896 Před rokem

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

  • @kirankumar8938
    @kirankumar8938 Před rokem

    @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 Před 11 měsíci +1

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

  • @MrSandshadow
    @MrSandshadow Před rokem

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

  • @Vibestr
    @Vibestr Před rokem

    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?