Yesterday I started blogging about my journey moving from the ‘classic’ build approach to YAML templates. I shared how you can use a Build completion trigger to link your YAML build to a previously completed build. Although this approach works, it is no longer recommended.
A better way is to use ‘Pipeline Resource Triggers’. This is done by defining a pipelines
resource inside your YAML template. pipelines
is a dedicated resource only for Azure Pipelines. Let’s have a look at the syntax:
In your resource definition, pipeline
is a unique value that you can use to reference the pipeline resource later on. source
is the name of the pipeline that produces an artifact.
Remark: As I mentioned in the example above, the source name is case sensitive.
More information: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/pipeline-triggers?view=azure-devops