I'd like to have separate pipelines for microservices, and also staging and production. It would look like this:
I'm just starting to setup the azure-pipelines.yaml and have this as the trigger for admin:
trigger:
branches:
include:
- staging
- production
paths:
include:
- admin/*
resources:
- repo: self
The issue I'm running into, as you might see right off the bat, is that when I commit to staging it is triggering both of the pipelines.
So my question is: is there a way to have one yaml for both staging and production for this microservice or do I need to have two separate yaml files?
EDIT:
Given these two things, I think what I'm trying to do is unlikely unless I make separate adminStaging.yaml and adminProduction.yaml:
You cannot use variables in triggers, as variables are evaluated at runtime (after the trigger has fired).
If you use templates to author YAML files, then you can only specify triggers in the main YAML file for the pipeline. You cannot specify triggers in the template files.
