Skip to content

Commit aa0f677

Browse files
committed
Merge branch 'main' into AzCosmos_ReplaceRxJavaWithReactorTest
2 parents f58d54a + b4be9cf commit aa0f677

File tree

32 files changed

+697
-494
lines changed

32 files changed

+697
-494
lines changed

eng/automation/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
SDK_ROOT = "../../" # related to file dir
1919
AUTOREST_CORE_VERSION = "3.9.7"
20-
AUTOREST_JAVA = "@autorest/[email protected].60"
20+
AUTOREST_JAVA = "@autorest/[email protected].62"
2121
DEFAULT_VERSION = "1.0.0-beta.1"
2222
GROUP_ID = "com.azure.resourcemanager"
2323
API_SPECS_FILE = "api-specs.yaml"

eng/common/pipelines/templates/steps/daily-dev-build-variable.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# is used when this pipeline is going to be generating and publishing daily dev builds.
33
parameters:
44
ServiceDirectory: ''
5+
Artifacts: []
56
Condition: succeeded()
67
steps:
78
- ${{if ne(parameters.ServiceDirectory, '')}}:
@@ -11,6 +12,7 @@ steps:
1112
arguments: >
1213
-ServiceDirectory ${{parameters.ServiceDirectory}}
1314
-OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo
15+
-artifactList @('${{ replace(convertToJson(parameters.Artifacts), '''', '`''') }}' | ConvertFrom-Json | Select-Object -ExpandProperty name)
1416
pwsh: true
1517
workingDirectory: $(Pipeline.Workspace)
1618
displayName: Dump Package properties

eng/common/scripts/Save-Package-Properties.ps1

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ package properties JSON file. If the package properties JSON file already
3030
exists, read the Version property from the existing package properties JSON file
3131
and set that as the Version property for the new output. This has the effect of
3232
"adding" a DevVersion property to the file which could be different from the
33-
Verison property in that file.
33+
Version property in that file.
34+
35+
.PARAMETER artifactList
36+
Optional array of artifact names to filter the package properties. Only packages
37+
with artifact names matching entries in this list will be processed.
3438
#>
3539

3640
[CmdletBinding()]
@@ -39,7 +43,8 @@ Param (
3943
[Parameter(Mandatory = $True)]
4044
[string] $outDirectory,
4145
[string] $prDiff,
42-
[switch] $addDevVersion
46+
[switch] $addDevVersion,
47+
[array] $artifactList
4348
)
4449

4550
. (Join-Path $PSScriptRoot common.ps1)
@@ -132,6 +137,38 @@ if (-not (Test-Path -Path $outDirectory))
132137
New-Item -ItemType Directory -Force -Path $outDirectory | Out-Null
133138
}
134139

140+
if ($artifactList)
141+
{
142+
# Filter out null, empty, or whitespace-only entries
143+
$filteredArtifacts = @($artifactList | Where-Object { -not [string]::IsNullOrWhiteSpace($_) })
144+
145+
if ($filteredArtifacts.Count -eq 0)
146+
{
147+
Write-Warning "Artifact list contains no valid entries"
148+
}
149+
else
150+
{
151+
Write-Host "Filtering package properties to match artifact list: $($filteredArtifacts -join ', ')"
152+
$artifactSet = New-Object 'System.Collections.Generic.HashSet[string]' ([System.StringComparer]::OrdinalIgnoreCase)
153+
foreach ($artifact in $filteredArtifacts) {
154+
$artifactSet.Add($artifact) | Out-Null
155+
}
156+
157+
# Warn about packages missing ArtifactName property
158+
$missingArtifactName = $allPackageProperties | Where-Object { $_.PSObject.Properties.Name -notcontains 'ArtifactName' }
159+
foreach ($pkg in $missingArtifactName) {
160+
Write-Warning "Package '$($pkg.PackageName)' does not have an 'ArtifactName' property and will be excluded from artifact filtering."
161+
}
162+
$allPackageProperties = $allPackageProperties | Where-Object { $_.ArtifactName -and $artifactSet.Contains($_.ArtifactName) }
163+
164+
if (!$allPackageProperties)
165+
{
166+
Write-Error "No packages found matching the provided artifact list"
167+
exit 1
168+
}
169+
}
170+
}
171+
135172
foreach ($pkg in $allPackageProperties)
136173
{
137174
if ($pkg.Name)

0 commit comments

Comments
 (0)