-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload logs on cmake generate/build failure (#5293)
* Upload logs on cmake generate/build failure * Copy relevant files to staging location, clean up after publishing * Update cspell words * Test: break cmake generate in a way that'll produce SOME log files. * Revert "Test: break cmake generate in a way that'll produce SOME log files." This reverts commit d5a3005. * Show failure logs instead of uploading artifacts. Only show log files for vcpkg at this time * Reapply "Test: break cmake generate in a way that'll produce SOME log files." This reverts commit 582629a. * Revert "Reapply "Test: break cmake generate in a way that'll produce SOME log files."" This reverts commit 7a35250. * Another type of test * Revert inadvertent whitespace changes * Revert "Another type of test" This reverts commit e38013f. * More logging
- Loading branch information
1 parent
5a70fca
commit ce4f25d
Showing
7 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
steps: | ||
- task: PowerShell@2 | ||
condition: failed() | ||
displayName: Show build failure logs | ||
inputs: | ||
filePath: eng/scripts/Show-FailureLogs.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Only show contents of particular vcpkg log files whose potentially sensitive | ||
# information will be redacted by DevOps (if it's included). | ||
|
||
# Before adding other expressions to output ensure that those logs will not | ||
# contain sensitive information or that DevOps is properly configured to remove | ||
# sensitive information. | ||
|
||
$logFiles = Get-ChildItem -Recurse -Filter *.log | ||
$filteredLogs = $logFiles.Where({ $_.Name -in ('vcpkg-bootstrap.log', 'vcpkg-manifest-install.log') }) | ||
|
||
if (!$filteredLogs) { | ||
Write-Host "No logs found" | ||
exit 0 | ||
} | ||
|
||
foreach ($logFile in $filteredLogs) | ||
{ | ||
Write-Host "//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////" | ||
Write-Host "==============================================================================================================================" | ||
Write-Host "Log file: $logFile" | ||
Write-Host "==============================================================================================================================" | ||
Get-Content $logFile | Write-Host | ||
} | ||
|
||
exit 0 |