From 8e8c52c4abe011a4cf3334da0726ef1fc0d17b14 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 2 Sep 2019 14:10:11 +0200 Subject: [PATCH 1/2] hack/ci/windows.ps1: explicitly set exit code to result of tests Trying to see if this helps with the cleanup step exiting in CI, but Jenkins continuing to wait for the script to end afterwards. Signed-off-by: Sebastiaan van Stijn --- hack/ci/windows.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hack/ci/windows.ps1 b/hack/ci/windows.ps1 index 9e999c970b..8f0d962ca7 100644 --- a/hack/ci/windows.ps1 +++ b/hack/ci/windows.ps1 @@ -960,6 +960,9 @@ Catch [Exception] { Throw $_ } Finally { + # Preserve the LastExitCode of the tests + $tmpLastExitCode = $LastExitCode + $ErrorActionPreference="SilentlyContinue" $global:ProgressPreference=$origProgressPreference Write-Host -ForegroundColor Green "INFO: Tidying up at end of run" @@ -997,4 +1000,6 @@ Finally { $Dur=New-TimeSpan -Start $StartTime -End $(Get-Date) Write-Host -ForegroundColor $FinallyColour "`nINFO: executeCI.ps1 exiting at $(date). Duration $dur`n" + + exit $tmpLastExitCode } From 7eb522a2350d759cf6a9aad493ac1b8ffc3d3335 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 6 Sep 2019 23:32:57 +0200 Subject: [PATCH 2/2] hack/ci/windows.ps1 print all environment variables to check how Jenkins runs this script Signed-off-by: Sebastiaan van Stijn --- hack/ci/windows.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hack/ci/windows.ps1 b/hack/ci/windows.ps1 index 8f0d962ca7..4c6368ec42 100644 --- a/hack/ci/windows.ps1 +++ b/hack/ci/windows.ps1 @@ -15,6 +15,11 @@ if ($env:BUILD_TAG -match "-LoW") { $env:LCOW_MODE=1 } if ($env:BUILD_TAG -match "-WoW") { $env:LCOW_MODE="" } +Write-Host -ForegroundColor Red "DEBUG: print all environment variables to check how Jenkins runs this script" +$allArgs = [Environment]::GetCommandLineArgs() +Write-Host -ForegroundColor Red $allArgs +Write-Host -ForegroundColor Red "----------------------------------------------------------------------------" + # ------------------------------------------------------------------------------------------- # When executed, we rely on four variables being set in the environment: #