I have next structure of my repo in Azure's VisualStudio:
development ↴
- Branch1
- Branch2
I have a pipeline.yaml in the development branch:
trigger:
- development
pool:
vmImage: ubuntu-latest
variables:
- name: DEPLOYMENT
value: development
jobs:
- job: Print evironment
steps:
- script: printenv | sort
I have a pipeline linked to that file in development branch. Also I have a policy to run that pipeline for pull requests.
And I have two problems with this config.
- When I am pushing anything into ANY branch that has that pileline.yaml file - pipeline will be triggered for that branch. And that affects all the branches nested from development branch
- When I am creating a pull request - it is triggering the build. But if I am pushing changes to the branch then two builds are triggering. One for the branch itself and one for pull request.
What am I doing wrong?