We have Azure Devops setup. Right now our Project will Build Twice.
Once during Pull Request Checkin in the YAML file, and another due to Build Settings (picture below).<
Functionally the two build may not always be the same.
Lets say you have the below example. Capital letters are commits and lower-case letters are potential commits.
e e'
/ \
| | D
C | B
\ | /
A
This shows, two branches coming off of the A commit (master branch). Each feature branch had a PR created for each one. One branch has a build on the e commit and the other branch had a build on the e' commit. Azure devops cannot be sure which PR will be merged first.
Once you merge both of the PR's you will end up with a new commit in master that has not been previously built. This is described here
F
E \
/ | D
C | B
\ | /
A
If you want to eliminate the need for your build on master, you can set the build expiration to Immediately when branch name is updated