Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CIMatrixConfig null coalesce operator. Add the property CIMatrixConfigs
  • Loading branch information
scbedd authored and azure-sdk committed Oct 30, 2024
commit f8dfcde2894d7fa8b1d4f6ccdaa329d9ee912616
1 change: 1 addition & 0 deletions eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class PackageProps
# additional packages required for validation of this one
[string[]]$AdditionalValidationPackages
[HashTable]$ArtifactDetails
[HashTable[]]$CIMatrixConfigs

PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory)
{
Expand Down
4 changes: 1 addition & 3 deletions eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ $packageProperties = Get-ChildItem -Recurse "$PackagePropertiesFolder" *.json `

# set default matrix config for each package if there isn't an override
$packageProperties | ForEach-Object {
if (-not $_.CIMatrixConfigs) {
$_.CIMatrixConfigs = $configs
}
$_.CIMatrixConfigs = $_.CIMatrixConfigs ?? $configs
}

# The key here is that after we group the packages by the matrix config objects, we can use the first item's MatrixConfig
Expand Down