From 0a963de356d87da3a9f8fe0182a0f914688bce1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Wei=C3=9Fe?= Date: Tue, 9 Apr 2024 15:21:38 +0200 Subject: [PATCH] update retry condition in last iteration --- .github/workflows/e2e-windows.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-windows.yml b/.github/workflows/e2e-windows.yml index f37be775e..6722ee816 100644 --- a/.github/workflows/e2e-windows.yml +++ b/.github/workflows/e2e-windows.yml @@ -98,8 +98,10 @@ jobs: if (-not $?) { Write-Host "Execution of command 'kubectl' failed with exit code: $LASTEXITCODE" - Write-Host "Retrying in $retryIntervalSeconds seconds..." - Start-Sleep -Seconds $retryIntervalSeconds + if ($retryCount -lt $maxRetries) { + Write-Host "Retrying in $retryIntervalSeconds seconds..." + Start-Sleep -Seconds $retryIntervalSeconds + } continue } @@ -119,7 +121,7 @@ jobs: } } - if (-not $allNodesReady) { + if (-not $allNodesReady -and $retryCount -lt $maxRetries) { Write-Host "Retrying in $retryIntervalSeconds seconds..." Start-Sleep -Seconds $retryIntervalSeconds }