diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index 73c1ce23e..c591c508b 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -94,7 +94,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 diff --git a/eng/pipelines/templates/steps/vmr-prepare.yml b/eng/pipelines/templates/steps/vmr-prepare.yml index 08c40b646..644891799 100644 --- a/eng/pipelines/templates/steps/vmr-prepare.yml +++ b/eng/pipelines/templates/steps/vmr-prepare.yml @@ -28,11 +28,11 @@ 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: | + 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 diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkFiles.diff b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkFiles.diff index 5749c4e82..434883537 100644 --- a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkFiles.diff +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkFiles.diff @@ -48,7 +48,6 @@ index ------------ ./packs/NETStandard.Library.Ref/x.y.z/ref/netstandard2.1/System.Xml.XPath.XDocument.dll ./sdk-manifests/ ./sdk-manifests/x.y.z/ --./sdk-manifests/x.y.z/ -./sdk-manifests/x.y.z/ ./sdk-manifests/x.y.z/microsoft.net.workload.emscripten.current/ ./sdk-manifests/x.y.z/microsoft.net.workload.emscripten.current/x.y.z/