[devops] Upload all binlogs from the Windows tests (#17720)

This commit is contained in:
Rolf Bjarne Kvinge 2023-03-07 07:49:46 +01:00 коммит произвёл GitHub
Родитель 666bd9ae9e
Коммит d5fb1c60e9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 25 добавлений и 0 удалений

Просмотреть файл

@ -35,6 +35,31 @@ steps:
Write-Host "Mac agent IP: $Env:MAC_AGENT_IP"
displayName: Run tests
# Upload all the binlogs
# Copy all the binlogs to a separate directory, keeping directory structure.
- pwsh: |
$sourceDir = '$(Build.SourcesDirectory)\xamarin-macios'
$targetDir = '$(Build.ArtifactStagingDirectory)\windows-binlogs'
$binlogs = Get-ChildItem $sourceDir -Recurse -Include "*.binlog"
foreach ($binlog in $binlogs) {
$targetFile = $targetDir + $binlog.FullName.SubString($sourceDir.Length);
New-Item -ItemType File -Path $targetFile -Force
Copy-Item $binlog.FullName -destination $targetFile
}
displayName: Copy all binlogs
continueOnError: true
condition: succeededOrFailed()
# Publish all the binlogs we collected in the previous step
- task: PublishPipelineArtifact@1
displayName: 'Publish Artifact: Windows binlogs'
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/windows-binlogs
artifactName: windows-binlogs-test-$(Build.BuildId)-$(System.JobAttempt)
continueOnError: true
condition: succeededOrFailed()
- pwsh: |
Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY\xamarin-macios\tools\devops\automation\scripts\MaciosCI.psd1
$vsts = New-VSTS -Org "devdiv" -Project "DevDiv" -Token $(MacPoolAccessToken)