[release/8.0.1xx] Check out the correct target VMR branch (#17656)

This commit is contained in:
Přemek Vysoký 2023-10-30 17:39:58 +01:00 committed by GitHub
parent 00fbfd8650
commit b5d77c4daf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 12 deletions

View file

@ -90,7 +90,10 @@ jobs:
steps:
- template: ../steps/vmr-prepare.yml
parameters:
vmrBranch: ${{ parameters.vmrBranch }}
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
vmrBranch: $(System.PullRequest.TargetBranch)
${{ else }}:
vmrBranch: ${{ parameters.vmrBranch }}
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
skipComponentGovernanceDetection: true

View file

@ -28,11 +28,13 @@ steps:
path: vmr
clean: true
- ${{ if or(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal')) }}:
- script: |
git switch -c ${{ parameters.vmrBranch }}
displayName: Checkout ${{ parameters.vmrBranch }}
workingDirectory: $(Agent.BuildDirectory)/vmr
- script: |
set -euxo pipefail
git fetch --all
git checkout --track origin/${{ parameters.vmrBranch }}
echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}"
displayName: Check out ${{ parameters.vmrBranch }}
workingDirectory: $(Agent.BuildDirectory)/vmr
# TODO (https://github.com/dotnet/arcade/issues/11332): Allow full CG?
# Currently, we ignore dirs of individual repos - they have been scanned before

View file

@ -22,12 +22,6 @@ steps:
displayName: Clone dotnet/installer
path: installer
- script: |
git checkout -B ${{ parameters.vmrBranch }}
echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}"
displayName: Prepare branch ${{ parameters.vmrBranch }}
workingDirectory: ${{ parameters.vmrPath }}
- script: >
./eng/vmr-sync.sh
--vmr ${{ parameters.vmrPath }}