Trying to trigger an Azure YAML pipeline using Tag when another YAML pipeline has been completed.
There’s documentation indicating that you can add a pipeline resource with:
resources:
pipelines:
- pipeline: MyCIAlias
source: Farbrikam-CI
trigger:
tags: # This filter is used for triggering the pipeline run
- Production # Tags are AND'ed
- Signed
This is my code which I am adding in my 2nd pipeline which I want to trigger using tag automatically:
resources:
pipelines:
- pipeline: POCPipeline
source: ******
trigger:
tags:
- Tagtest
Can someone please help me with this if anything is wrong as it is not triggering my 2nd pipeline with Tagtest?
2
Answers
I can reproduce the same issue that the Tag filters for pipeline resource does not work with below configurations. The current pipeline cannot be triggered by the pipeline resource completed on tage ‘
tag01
‘.or
When I change the configuration of pipeline resource like as below, the current pipeline can be triggered by the pipeline resource.
However, this configuration will let the current pipeline be triggered when the pipeline resource runs is completed on any branch or any tag.
Looks like, there is problem on the Tag filters for pipeline resource. I recommend you try open a ticket on Developer Community to report this issue. If the support engineer who handles your ticket also can reproduce the same issue, your ticket generally will be reported to the appropriate product team for further investigation and fix.
In my case, your sample works fine. The pipelines:
The trigger for the second pipeline:
If you add the tag to the source build during the build process, the second pipeline starts fine:
You may add the tag manually or through the logging command: AddBuildTag: Add a tag to the build
Example for the first pipeline to add a tag through variables and logging command: