From a02002075f59a97da9c3d17994a2dc99bbf4720e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Wei=C3=9Fe?= Date: Tue, 9 Apr 2024 14:49:38 +0200 Subject: [PATCH] workflows: add error handling to e2e windows liveness probe --- .github/workflows/e2e-windows.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/e2e-windows.yml b/.github/workflows/e2e-windows.yml index 786b87978..f37be775e 100644 --- a/.github/workflows/e2e-windows.yml +++ b/.github/workflows/e2e-windows.yml @@ -96,6 +96,13 @@ jobs: $nodesOutput = & kubectl get nodes --kubeconfig "$PWD\constellation-admin.conf" + if (-not $?) { + Write-Host "Execution of command 'kubectl' failed with exit code: $LASTEXITCODE" + Write-Host "Retrying in $retryIntervalSeconds seconds..." + Start-Sleep -Seconds $retryIntervalSeconds + continue + } + $lines = $nodesOutput -split "`r?`n" | Select-Object -Skip 1 $allNodesReady = $true