Upload failed patches as build artifacts (#17864)

This commit is contained in:
Přemek Vysoký 2023-11-27 16:39:11 +01:00 committed by GitHub
parent e4ecc549a9
commit 8b86646290
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -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()

View file

@ -268,6 +268,7 @@ fi
$additional_remotes \
--readme-template "$readme_template" \
--tpn-template "$tpn_template" \
--discard-patches \
"$repository"
if [[ $? == 0 ]]; then