0

I'm trying to create a release flow that uses Azure DevOps Pipline to create a release branch from a develop branch as a resource for files on the release branch.

Is there a way to diff to determine if the file I'm using for release in Azure DevOps Piplines matches the file on the develop branch?

TA Hyouno
  • 377
  • 1
  • 2
  • 8

1 Answers1

1

In the release pipeline, if you use azure repo as artifact source, then from the Artifact page, you can see which commit is selected as the source.

enter image description here

Then go to the list of branches for the repository, you can click on ... (More Actions) on the release branches and choose Compare branches.

enter image description here

According to the commit id, you can compare the commits and files of the release branch and the develop branch to determine whether the file used in the release match the file on the develop branch.

enter image description here

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • thanks. Is it possible to implement diff judgment on azure pipelines yaml instead of GUI? – TA Hyouno Jan 12 '21 at 04:02
  • 1
    You can use git command in yaml pipeline to compare files from two different branches, for example: `git diff branch1:file branch2:file`. Here is a [ticket](https://stackoverflow.com/questions/4099742/how-to-compare-files-from-two-different-branches) you can refer to. – Hugh Lin Jan 12 '21 at 08:44
  • ‘Thank you. That’s the answer I was looking for. – TA Hyouno Jan 12 '21 at 09:03