diff --git a/eng/pipelines/templates/steps/vmr-pull-updates.yml b/eng/pipelines/templates/steps/vmr-pull-updates.yml index b22efd4ea..3d2fdf3cd 100644 --- a/eng/pipelines/templates/steps/vmr-pull-updates.yml +++ b/eng/pipelines/templates/steps/vmr-pull-updates.yml @@ -33,6 +33,7 @@ steps: - script: | git checkout -B ${{ parameters.vmrBranch }} echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}" + mkdir -p ${{ parameters.vmrPath }}/artifacts/x64/Release displayName: Prepare branch ${{ parameters.vmrBranch }} workingDirectory: ${{ parameters.vmrPath }} @@ -42,6 +43,12 @@ steps: displayName: Set git author to dotnet-maestro[bot] workingDirectory: ${{ parameters.vmrPath }} +- script: | + echo '**/*' > .artifactignore + echo '!./*.patch' >> .artifactignore + displayName: Prepare .artifactignore + workingDirectory: $(Agent.TempDirectory) + - script: > ./eng/vmr-sync.sh --vmr ${{ parameters.vmrPath }} @@ -54,5 +61,12 @@ steps: --readme-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/README.template.md --tpn-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt --debug + || + (echo "##vso[task.logissue type=error]Failed to synchronize the VMR" && exit 1) displayName: Synchronize dotnet/dotnet workingDirectory: $(Agent.BuildDirectory)/installer + +- publish: $(Agent.TempDirectory) + artifact: $(System.JobDisplayName)_FailedPatches + displayName: Upload failed patches + condition: failed() diff --git a/eng/vmr-sync.sh b/eng/vmr-sync.sh index db0f704e2..0e0a5b275 100755 --- a/eng/vmr-sync.sh +++ b/eng/vmr-sync.sh @@ -268,6 +268,7 @@ fi $additional_remotes \ --readme-template "$readme_template" \ --tpn-template "$tpn_template" \ + --discard-patches \ "$repository" if [[ $? == 0 ]]; then