[ci] Don't emit warnings for absence of failure logs (#20316)

* No warning for absence of failure logs

* Update condition for osx and linux

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Kai Pastor 2021-09-28 23:00:33 +02:00 committed by GitHub
parent 09980780d8
commit 827a54c404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 3 deletions

View File

@ -56,7 +56,7 @@ jobs:
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs'
ArtifactName: 'failure logs for x64-linux'
condition: always()
condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True')
- bash: |
python3 scripts/file_script.py /mnt/vcpkg-ci/installed/vcpkg/info/
displayName: 'Build a file list for all packages'

View File

@ -50,7 +50,7 @@ jobs:
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs'
ArtifactName: 'failure logs for x64-osx'
condition: always()
condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True')
- bash: |
python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/
displayName: 'Build a file list for all packages'

View File

@ -137,6 +137,9 @@ else
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @commonArgs
}
$failureLogsEmpty = ((Test-Path $failureLogs) -and (Get-ChildItem $failureLogs).count -eq 0)
Write-Host "##vso[task.setvariable variable=FAILURE_LOGS_EMPTY]$failureLogsEmpty"
if ($LASTEXITCODE -ne 0)
{
throw "vcpkg ci failed"

View File

@ -115,7 +115,7 @@ jobs:
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs'
ArtifactName: 'failure logs for ${{ parameters.triplet }}'
condition: always()
condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True')
- task: PowerShell@2
displayName: 'Build a file list for all packages'
condition: always()