Sync eng/common directory with azure-sdk-tools for PR 1448 (#615)

* Added more logging to API view create

* Updated logs with arch board rescue email address

* Fix as per review comments

* Update logging to show API URL

Co-authored-by: praveenkuttappan <prmarott@microsoft.com>
This commit is contained in:
Azure SDK Bot 2021-03-05 06:46:56 -08:00 коммит произвёл GitHub
Родитель 500e33c872
Коммит b9af79915b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@ -41,11 +41,12 @@ function Submit-APIReview($packagename, $filePath, $uri, $apiKey, $apiLabel)
try
{
$Response = Invoke-WebRequest -Method 'POST' -Uri $uri -Body $multipartContent -Headers $headers
Write-Host "API Review: $($Response)"
Write-Host "API Review URL: $($Response.Content)"
$StatusCode = $Response.StatusCode
}
catch
{
Write-Host "Exception details: $($_.Exception.Response)"
$StatusCode = $_.Exception.Response.StatusCode
}
@ -101,6 +102,9 @@ foreach ($pkgName in $responses.Keys)
{
$pkgInfo = Get-Content $pkgPropPath | ConvertFrom-Json
$version = [AzureEngSemanticVersion]::ParseVersionString($pkgInfo.Version)
Write-Host "Package name: $($PackageName)"
Write-Host "Version: $($version)"
Write-Host "SDK Type: $($pkgInfo.SdkType)"
if ($version.IsPrerelease)
{
Write-Host "Package version is not GA. Ignoring API view approval status"
@ -110,12 +114,16 @@ foreach ($pkgName in $responses.Keys)
$FoundFailure = $True
if ($respCode -eq '201')
{
Write-Error "Automatic API Review approval is pending for package $($PackageName)"
Write-Host "Package version $($version) is GA and automatic API Review is not yet approved for package $($PackageName)."
Write-Host "Build and release is not allowed for GA package without API review approval."
Write-Host "You will need to queue another build to proceed further after API review is approved"
Write-Host "You can check http://aka.ms/azsdk/engsys/apireview/faq for more details on API Approval."
}
else
{
Write-Error "Failed to create API Review for package $($PackageName)"
}
Write-Host "Failed to create API Review for package $($PackageName). Please reach out to Azure SDK engineering systems on teams channel and share this build details."
}
exit 1
}
else
{
@ -124,8 +132,3 @@ foreach ($pkgName in $responses.Keys)
}
}
}
if ($FoundFailure)
{
Write-Error "Automatic API review is not yet approved for package $($PackageName)"
exit 1
}