I have two build pipelines on Azure DevOps. Let's call the pipelines as Pipeline A and Pipeline B.
Both pipelines' default branches are set to "Development" branch in Get Sources section.
Pipeline A enables the continuous integration and has the branch filters for two branches:
- Development
- Test
So Pipeline A is being triggered once the code is merged to Development OR Test branch.
Pipeline B trigger is set to Build Completion of Pipeline A, and branch filters are added to both Development and Test, as well.
Pipeline B is triggered when Pipeline A is completed for Development or Test branch merges, HOWEVER, when Pipeline A is triggered by Test branch and completed, Pipeline B pulls the code base from Development branch (since it is set as default branch), regardless of which branch Pipeline A is triggered by. Pipeline A simply gets it's sources from the triggering branch, however Pipeline B is simply going with the default branch.
How can I make my Pipeline B to use it's code base as the same as triggering pipeline's (Pipeline A) code base?
Hint: I am using classic editor in my pipelines workflow.