I am using Azure Pipelines and have the following situation:
I have one repository with the folders A and B (and many more in the future). If I run the pipeline manually, I do chose A or B and the pipeline does stuff with the files in that folder. This is fine for my branches, but I also want an automatic trigger for my main branch.
How do I get a variable that depends on the path of the code change?
My trigger looks something like this:
trigger:
branches:
include:
- main
paths:
include:
- abc/xyz/A/*
- abc/xyz/B/*
And all I need is a variable that is A or B now, depending on the path where the change occured. (Ideally if there are changes in both folders the pipeline should trigger twice, but this is the next problem I have to take on)