mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Log sending daily web hook. (#5203)
Make sure we count xunit tests failures as a CI failure.
This commit is contained in:
committed by
Dongbo Wang
parent
1f75e81e4c
commit
8051977ef5
+13
-3
@@ -15,6 +15,7 @@ function Send-DailyWebHook
|
||||
# Varible should be set in Travis-CI.org settings
|
||||
if ($env:WebHookUrl)
|
||||
{
|
||||
log "Sending DailyWebHook with result '$result'."
|
||||
$webhook = $env:WebHookUrl
|
||||
|
||||
$Body = @{
|
||||
@@ -230,6 +231,17 @@ else
|
||||
$result = "FAIL"
|
||||
}
|
||||
|
||||
try {
|
||||
Start-PSxUnit
|
||||
}
|
||||
catch {
|
||||
$result = "FAIL"
|
||||
if (!$resultError)
|
||||
{
|
||||
$resultError = $_
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $isPr) {
|
||||
# Run 'CrossGen' for push commit, so that we can generate package.
|
||||
# It won't rebuild powershell, but only CrossGen the already built assemblies.
|
||||
@@ -266,7 +278,7 @@ else
|
||||
write-warning "Could not retrieve $result badge"
|
||||
}
|
||||
else {
|
||||
Write-Verbose -verbose "Setting status badge to '$result'"
|
||||
log "Setting status badge to '$result'"
|
||||
Set-DailyBuildBadge -content $svgData
|
||||
}
|
||||
}
|
||||
@@ -286,6 +298,4 @@ else
|
||||
if ( $result -eq "FAIL" ) {
|
||||
Throw $resultError
|
||||
}
|
||||
|
||||
Start-PSxUnit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user