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.
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
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
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 ?
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,
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?
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
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
@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,
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?
Thanks a lot Houssem, your example was way more concrete than the Azure documentation !
Thank you very much! Saved me a lot of time and effort! Keep up and good luck!
Mate, thank you so much for this demo - it is so much better than the Azure doco. Once again, thx heaps.🙏
Useful video, thanks Houssem!
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.
Thanks! That was very helpful
Hi, Thanks for sharing this, but I wonder How can we trigger the second pipeline when the first pipeline has failed?
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
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
Thanks!
I got a error Resource pipeline input not valid
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 ?
Very usefull content so far, Could you please create more video on this with real life scenario ?
Nice Tutorial, but getting error while validation of template "pipeline resource input must be valid" at project keyword, can you please suggest here.
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,
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?
Task groups are also another way to share a pipeline. And yes you can pass variables.
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
Hey Houssem, if the code is in a different repository and on a different branch, how can we trigger a pipeline from another pipeline?
I have one doubt
But how do you call another Pipeline in another repo? error: /....yml: File /... not found in repository
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
Did you get solution for this . Please provide i am also looking for the same
@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,
add the template step at the end of each stage as the last job
how can we trigger a release pipeline from another release pipeline?
I have the same question
@@MagoDeOZner Same anyone found a solution?
Is it also applicable for classical pipelines ?
the pipeline resource is not being documented anywhere. where / when is this being defined?
I think you confused templating parts of pipeline with triggering separate successor pipeline... Good job on the resource trigger though :)
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?
same question