mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-12 12:46:54 +00:00
Change RetryCount
This commit is contained in:
@@ -3,8 +3,8 @@ class AzureDevOpsApi
|
|||||||
[string] $BaseUrl
|
[string] $BaseUrl
|
||||||
[string] $RepoOwner
|
[string] $RepoOwner
|
||||||
[object] $AuthHeader
|
[object] $AuthHeader
|
||||||
[UInt32] $RetryCount = 0
|
[UInt32] $RetryCount
|
||||||
[UInt32] $RetryIntervalSec = 30
|
[UInt32] $RetryIntervalSec
|
||||||
|
|
||||||
AzureDevOpsApi(
|
AzureDevOpsApi(
|
||||||
[string] $TeamFoundationCollectionUri,
|
[string] $TeamFoundationCollectionUri,
|
||||||
@@ -15,13 +15,8 @@ class AzureDevOpsApi
|
|||||||
) {
|
) {
|
||||||
$this.BaseUrl = $this.BuildBaseUrl($TeamFoundationCollectionUri, $ProjectName)
|
$this.BaseUrl = $this.BuildBaseUrl($TeamFoundationCollectionUri, $ProjectName)
|
||||||
$this.AuthHeader = $this.BuildAuth($AccessToken)
|
$this.AuthHeader = $this.BuildAuth($AccessToken)
|
||||||
|
$this.RetryCount = $RetryCount
|
||||||
if ($RetryCount -gt 0) {
|
$this.RetryIntervalSec = $RetryIntervalSec
|
||||||
$this.RetryCount = $RetryCount
|
|
||||||
}
|
|
||||||
if ($RetryIntervalSec -gt 0) {
|
|
||||||
$this.RetryIntervalSec = $RetryIntervalSec
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[object] hidden BuildAuth([string]$AccessToken) {
|
[object] hidden BuildAuth([string]$AccessToken) {
|
||||||
@@ -96,8 +91,8 @@ function Get-AzureDevOpsApi {
|
|||||||
[string] $TeamFoundationCollectionUri,
|
[string] $TeamFoundationCollectionUri,
|
||||||
[string] $ProjectName,
|
[string] $ProjectName,
|
||||||
[string] $AccessToken,
|
[string] $AccessToken,
|
||||||
[UInt32] $RetryCount,
|
[UInt32] $RetryCount = 3,
|
||||||
[UInt32] $RetryIntervalSec
|
[UInt32] $RetryIntervalSec = 30
|
||||||
)
|
)
|
||||||
|
|
||||||
return [AzureDevOpsApi]::New($TeamFoundationCollectionUri, $ProjectName, $AccessToken, $RetryCount, $RetryIntervalSec)
|
return [AzureDevOpsApi]::New($TeamFoundationCollectionUri, $ProjectName, $AccessToken, $RetryCount, $RetryIntervalSec)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ param (
|
|||||||
[Parameter(Mandatory)] [bool] $WaitForBuilds,
|
[Parameter(Mandatory)] [bool] $WaitForBuilds,
|
||||||
[string] $ToolVersions,
|
[string] $ToolVersions,
|
||||||
[UInt32] $RetryIntervalSec = 30,
|
[UInt32] $RetryIntervalSec = 30,
|
||||||
[UInt32] $RetryCount = 20
|
[UInt32] $RetryCount = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
Import-Module (Join-Path $PSScriptRoot "azure-devops-api.ps1")
|
Import-Module (Join-Path $PSScriptRoot "azure-devops-api.ps1")
|
||||||
|
|||||||
Reference in New Issue
Block a user