Add retry strategy

This commit is contained in:
Nikolay Frolov
2021-10-05 13:54:40 +03:00
parent fb0eac418a
commit 7114ad2b94

View File

@@ -40,7 +40,7 @@ function Test-DownloadUrl {
Write-Host "Downloading manifest json from '$ManifestUrl'..." Write-Host "Downloading manifest json from '$ManifestUrl'..."
try { try {
$manifestResponse = Invoke-WebRequest -Method Get -Uri $ManifestUrl -Headers $webRequestHeaders $manifestResponse = Invoke-WebRequest -Method Get -Uri $ManifestUrl -Headers $webRequestHeaders -MaximumRetryCount 5 -RetryIntervalSec 10
} catch { } catch {
Publish-Error "Unable to download manifest json from '$ManifestUrl'" $_ Publish-Error "Unable to download manifest json from '$ManifestUrl'" $_
exit 1 exit 1