Skip to content

Commit 86d5d1f

Browse files
authored
Revert "Sync eng/common directory with azure-sdk-tools for PR 2673 (Azure#20198)" (Azure#20204)
This reverts commit 752a736.
1 parent cd49714 commit 86d5d1f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

eng/common/scripts/Helpers/Metadata-Helpers.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function GetMsAliasFromGithub ($TenantId, $ClientId, $ClientSecret, $GithubUser)
3030
$opsAuthToken = Generate-AadToken -TenantId $TenantId -ClientId $ClientId -ClientSecret $ClientSecret
3131
$Headers["Authorization"] = "Bearer $opsAuthToken"
3232
Write-Host "Fetching aad identity for github user: $GithubUser"
33-
$resp = Invoke-RestMethod $OpensourceAPIBaseURI -Method 'GET' -Headers $Headers -MaximumRetryCount 3
33+
$resp = Invoke-RestMethod $OpensourceAPIBaseURI -Method 'GET' -Headers $Headers
3434
}
3535
catch {
36-
Write-Warning $_
36+
Write-Error $_
3737
return $null
3838
}
3939

@@ -43,7 +43,7 @@ function GetMsAliasFromGithub ($TenantId, $ClientId, $ClientSecret, $GithubUser)
4343
Write-Host "Fetched aad identity $($resp.aad.alias) for github user $GithubUser."
4444
return $resp.aad.alias
4545
}
46-
Write-Warning "Failed to retrieve the aad identity from given github user: $GithubName"
46+
Write-Error "Failed to retrieve the aad identity from given github user: $GithubName"
4747
return $null
4848
}
4949

@@ -54,6 +54,6 @@ function GetPrimaryCodeOwner ($TargetDirectory)
5454
Write-Host "Code Owners are $codeOwnerArray."
5555
return $codeOwnerArray[0]
5656
}
57-
Write-Warning "No code owner found in $TargetDirectory."
57+
Write-Error "No code owner found in $TargetDirectory."
5858
return $null
5959
}

eng/common/scripts/Update-DocsMsMetadata.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ foreach ($packageInfoLocation in $PackageInfoJsonLocations) {
225225
if ($ValidateDocsMsPackagesFn -and (Test-Path "Function:$ValidateDocsMsPackagesFn")) {
226226
Write-Host "Validating the package..."
227227
&$ValidateDocsMsPackagesFn -PackageInfo $packageInfo -PackageSourceOverride $PackageSourceOverride -DocValidationImageId $DocValidationImageId -DocRepoLocation $DocRepoLocation
228+
if ($LASTEXITCODE) {
229+
LogError "The package failed Doc.Ms validation. Check https://aka.ms/azsdk/docs/docker for more details on how to diagnose this issue."
230+
exit $LASTEXITCODE
231+
}
228232
}
229233
Write-Host "Updating the package json ..."
230234
UpdateDocsMsMetadataForPackage $packageInfoLocation $packageInfo

0 commit comments

Comments
 (0)