We have a branch policy requiring a pull request and validation using a pipeline. This does a merge with master, runs the pipeline to verify the build, and then waits for approval and completion of the pull request. After this occurs, the changes are actually merged into master, the master reference is moved to the new commit, and the build occurs again as part of our CI.
Is there a way to use the output of the PR validation build instead of running the build again? It seems wasteful. If the master branch is updated by another PR, the build validation has to run again. It seems like it is impossible to have a contents of the master branch that differ from what was used to build for PR validation.
I tried looking through documentation for azure-pipelines.yml
and didn’t find anything. Since the pipeline was created using that, I don’t see any settings in Azure Devops Server that could do it. The only settings for the build pipeline are ‘Processing of new run requests’, ‘YAML file path’, and ‘Automatically link work items included in this run’.