Is there any way to trigger a different pipeline inside of a pipeline in Azure Dev Ops

Copper Contributor

If I create a variable like IsTrigger and the default value of this variable is false and this value can be set at queque time.


I wonder what happens if I give this variable true as value when I run a pipeline.

Can I trigger a different pipeline based on the value of this variable?

 

for example:

 

eq(variables['IsTrigger', true]
 
- do trigger different pipeline
1 Reply
Yes, it is possible to trigger a different pipeline inside of a pipeline in Azure DevOps by using the variable you described, "IsTrigger".
You can check the value of the variable within your pipeline using the "Control Options" task.
You can set the condition of the task to eq(variables['IsTrigger'], 'true') and configure it to trigger another pipeline when the condition is true,
You can also use the "Azure DevOps Check Condition" task and check the condition eq(variables['IsTrigger'], 'true') and use the "Azure DevOps Task Group" task to call another pipeline based on the condition being true.
Note that you will have to link the pipeline you want to trigger by setting the "Task group" field of the task group task with the pipeline name.