In Azure DevOps build pipelines we have "Continues integration" and "Pull request validation" as a triggering option. If we enable the continues integration it automatically runs CI pipeline whenever we push something new. Why we need the "Pull request validation" option if it always builds the last commit of the source branch. Haven't we got the same with "Continues integration"? I was expecting to have there a build for merge commit, so we could escape the merge related failures on the main development branch.
1 Answers
5
votes
Most teams use a pull request as a code review process. Having the code built with the pull request gives the reviewers stats on the build without having to actually merge the code into the targeted branch. If you have a protected branch like master
, the reviewer(s) can look at build times, unit test coverage and/or compiler warnings without actually making any changes to the master
branch in Git. Remember that Git is distributed so it is actually possible to merge a breaking change into a branch even though you have CI setup. This step is simply a way to protect and safeguard key branches.