0

I have two branches, develop and feature/cool_feature. When I create a PR to merge feature/cool_feature into develop, our Azure Devops will automatically run a pipeline for this PR. My assumption is that the resulting artifacts contain both the feature/cool_feature and the current state of develop. Is this correct?

I've looked at several pages, but I cannot seem to find a definitive answer:

The reason I'm doubting is because we're reviewing our test strategy for this project. When determining if we should test the both the PR build and the build of develop after the PR is completed, we got into a discussion on the likelihood that the PR build is different than the "after-merge" develop build (both use the same pipeline). Also considering if we should make a merge of target branch (develop in my example) into the source branch (feature/cool_feature) mandatory before completing the PR. Azure does not seem to enforce this, it just checks for merge conflicts.

EDIT I did find this question: https://developercommunity.visualstudio.com/t/pr-build-fails-but-branch-build-succeeds/1194209 This seems to confirm my assumption.

Timo
  • 2,212
  • 2
  • 25
  • 46

1 Answers1

0

I do not think PR Artifact is a correct terming. There is Build Artifact. PR Artifact is Build Artifact resulting of your pull request build.

My assumption is that the resulting artifacts contain both the feature/cool_feature and the current state of develop. Is this correct?

Yes. DevOps merges changes from feature/cool_feature to develop through internal merge branch and builds it.

we got into a discussion on the likelihood that the PR build is different than the "after-merge" develop build (both use the same pipeline)

They should be equal.

Shamrai Aleksander
  • 13,096
  • 3
  • 24
  • 31
  • Do you know any documentation/sources that can confirm that they should be equal? (We use GitVersion, so I know they will not be the same **completely** as the version numbers for the assemblies will differ.) Also I do not fully understand how build validation policies will enforce the merge from develop into my feature branch before completing the PR. – Timo Mar 03 '23 at 15:09
  • @Timo _so I know they will not be the same completely as the version numbers for the assemblies will differ_ in case of build results, they are should be the same because the sources will be the same. But in case of version numbers, that depends of your build scripts and how they increment or construct your version. If they update your sources to update build version - that may cause differences in binaries. _mandatory before completing the PR_ you are right - that's a manual process. We use custom scripts in build validation to check if merge happened. – Shamrai Aleksander Mar 03 '23 at 15:52