Sync eng/common directory with azure-sdk-tools for PR 9381 (#31816)

* change our verifyChangelogs over to utilizing the artifact details. if we don't have an artifact details at all, don't verify changelog. if we do, but skipverifychangelog is present, don't verify changelog. if we have artifact details, but no disable, verify the changelog

---------

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
This commit is contained in:
Azure SDK Bot 2024-11-18 15:13:02 -08:00 коммит произвёл GitHub
Родитель 28b3e59046
Коммит 5edf27a030
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 14 добавлений и 22 удалений

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

@ -7,30 +7,17 @@ Set-StrictMode -Version 3
. (Join-Path $PSScriptRoot common.ps1) . (Join-Path $PSScriptRoot common.ps1)
function ShouldVerifyChangeLog ($ServiceDirectory, $PackageName) {
$jsonCiYmlPath = Join-Path $ServiceDirectory "ci.yml"
if (Test-Path $jsonCiYmlPath) function ShouldVerifyChangeLog ($PkgArtifactDetails) {
{ if ($PkgArtifactDetails) {
$ciYml = Get-Content $jsonCiYmlPath -Raw | yq -o=json | ConvertFrom-Json -AsHashTable if ($PkgArtifactDetails.PSObject.Properties["skipVerifyChangeLog"] -eq $true) {
if ($ciYml.extends -and $ciYml.extends.parameters -and $ciYml.extends.parameters.Artifacts) {
$packagesCheckingChangeLog = $ciYml.extends.parameters.Artifacts `
| Where-Object { -not ($_["skipVerifyChangelog"] -eq $true) } `
| Select-Object -ExpandProperty name
if ($packagesCheckingChangeLog -contains $PackageName)
{
return $true
} else {
return $false return $false
} }
}
}
}
if (-not (Get-Command 'yq' -ErrorAction SilentlyContinue)) { return $true
Write-Host "Error: 'yq' is not installed or not found in PATH. Please remedy this before running this script." }
exit 1
return $false
} }
# find which packages we need to confirm the changelog for # find which packages we need to confirm the changelog for
@ -41,7 +28,7 @@ $allPassing = $true
foreach($propertiesFile in $packageProperties) { foreach($propertiesFile in $packageProperties) {
$PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json $PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json
if (-not (ShouldVerifyChangeLog -ServiceDirectory (Join-Path $RepoRoot "sdk" $PackageProp.ServiceDirectory) -PackageName $PackageProp.Name)) { if (-not (ShouldVerifyChangeLog $PackageProp.ArtifactDetails)) {
Write-Host "Skipping changelog verification for $($PackageProp.Name)" Write-Host "Skipping changelog verification for $($PackageProp.Name)"
continue continue
} }

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

@ -1,5 +1,10 @@
# Release History # Release History
## 1.0.11-beta.1 (unreleased)
### Features Added
- Test Release Pipeline
## 1.0.10-beta.1 (2020-11-16) ## 1.0.10-beta.1 (2020-11-16)
### Features Added ### Features Added