Skip to content

Commit

Permalink
CIMatrixConfig null coalesce operator. Add the property CIMatrixConfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd authored and azure-sdk committed Oct 30, 2024
1 parent e3c1e92 commit 96c34a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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

0 comments on commit 96c34a9

Please sign in to comment.