Base on this article /questions/60643528/triggering-an-azure-devops-pipeline-from-another-pipeline, I’m attempting to configure the dependent pipeline to run only when the source pipeline is triggered by a tag push. Below are the configurations for both pipelines:
source pipeline
trigger:
branches:
include: # branch names which will trigger a build
- main
tags:
include:
- '*'
pr: none
steps:
# required to cause pipeline triggering downstream
- task: CopyFiles@2
inputs:
contents: $(System.DefaultWorkingDirectory)/**/*.yml
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: dummy-$(Build.BuildId)
depends pipeline
trigger: none
pr: none
resources:
pipelines:
- pipeline: source
# project: Pipelining
source: source
trigger:
branches:
include:
- main
tags:
- '*'
steps:
- checkout: none
- script: echo 'triggered depends'
The result is the depends pipeline not triggered.
I attempted to adjust the tag trigger configuration for the dependent pipeline, aiming to specify a particular tag instead of using a wildcard character ‘*’ as per the documentation on Azure Pipelines YAML schema https://learn.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=schema#define-a-pipelines-resource. However, I’m uncertain whether Azure Pipelines supports triggering a pipeline solely based on tags after another pipeline is triggered, or if tags are primarily used for filtering trigger events.
MR.Nate is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.