From 71203a01307f197bb303a4befc036238c71aeb03 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Wed, 18 Dec 2024 13:55:31 +0530 Subject: [PATCH] ci builds update to pick patch --- github/run-ci-builds.ps1 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/github/run-ci-builds.ps1 b/github/run-ci-builds.ps1 index e70f485..f8247e3 100644 --- a/github/run-ci-builds.ps1 +++ b/github/run-ci-builds.ps1 @@ -67,15 +67,16 @@ function Queue-Builds { Write-Host "Queue build for $version..." $GitHubApi.CreateWorkflowDispatch($WorkflowFileName, $WorkflowDispatchRef, $inputs) - Start-Sleep -s 10 - $workflowRunLink = Get-WorkflowRunLink -GitHubApi $GitHubApi ` - -WorkflowFileName $WorkflowFileName ` - -ToolVersion $version - - if (-not $workflowRunLink) { - Write-Host "Could not find build for $version..." - exit 1 - } + do { Start-Sleep -s 5 + $workflowRunLink = Get-WorkflowRunLink -GitHubApi $GitHubApi + -WorkflowFileName $WorkflowFileName + -ToolVersion $version + $retryCount++ + Write-Host "Attempt $retryCount of $maxRetries: Checking workflow run link for version $version..." + } while (-not $workflowRunLink -and $retryCount -lt $maxRetries) + if (-not $workflowRunLink) { + Write-Host "Failed to retrieve workflow link after $maxRetries attempts for version $version" + } Write-Host "Link to the build: $workflowRunLink" }