]> git.proxmox.com Git - mirror_edk2.git/commitdiff
.azurepipelines/templates/platform-build-run-steps.yml: Fetch target branch
authorSean Brogan <sean.brogan@microsoft.com>
Tue, 24 Nov 2020 21:12:30 +0000 (13:12 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 25 Nov 2020 17:54:11 +0000 (17:54 +0000)
Update Platform build steps process to fetch target branch

Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Sean Brogan <sean.brogan@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
.azurepipelines/templates/platform-build-run-steps.yml

index ebf674bfc7d8369939e5227e102cc5cf546b97e2..97e7faa266825563df97284b3e6f05f49e72d159 100644 (file)
@@ -51,6 +51,12 @@ steps:
 # Set default\r
 - bash: echo "##vso[task.setvariable variable=pkg_count]${{ 1 }}"\r
 \r
+# Fetch the target branch so that pr_eval can diff them.\r
+# Seems like azure pipelines/github changed checkout process in nov 2020.\r
+- script: git fetch origin $(System.PullRequest.targetBranch)\r
+  displayName: fetch target branch\r
+  condition: eq(variables['Build.Reason'], 'PullRequest')\r
+\r
 # trim the package list if this is a PR\r
 - task: CmdLine@1\r
   displayName: Check if ${{ parameters.build_pkg }} need testing\r