Skip to content

Commit cdd0874

Browse files
Add AdditionalMatrixConfigs the CIMatrixConfigs (Azure#32491)
Co-authored-by: James Suplizio <[email protected]>
1 parent f4cd00b commit cdd0874

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

eng/common/scripts/Package-Properties.ps1

+11-1
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,20 @@ class PackageProps {
9090
$result = [PSCustomObject]@{
9191
ArtifactConfig = [HashTable]$artifactForCurrentPackage
9292
MatrixConfigs = @()
93+
AdditionalMatrixConfigs = @()
9394
}
9495

9596
# if we know this is the matrix for our file, we should now see if there is a custom matrix config for the package
9697
$matrixConfigList = GetValueSafelyFrom-Yaml $content @("extends", "parameters", "MatrixConfigs")
9798

9899
if ($matrixConfigList) {
99-
$result.MatrixConfigs = $matrixConfigList
100+
$result.MatrixConfigs += $matrixConfigList
101+
}
102+
103+
$additionalMatrixConfigList = GetValueSafelyFrom-Yaml $content @("extends", "parameters", "AdditionalMatrixConfigs")
104+
105+
if ($additionalMatrixConfigList) {
106+
$result.AdditionalMatrixConfigs += $additionalMatrixConfigList
100107
}
101108

102109
return $result
@@ -123,6 +130,9 @@ class PackageProps {
123130
$this.CIMatrixConfigs = $ciArtifactResult.MatrixConfigs
124131
# if this package appeared in this ci file, then we should
125132
# treat this CI file as the source of the Matrix for this package
133+
if ($ciArtifactResult.PSObject.Properties.Name -contains "AdditionalMatrixConfigs" -and $ciArtifactResult.AdditionalMatrixConfigs) {
134+
$this.CIMatrixConfigs += $ciArtifactResult.AdditionalMatrixConfigs
135+
}
126136
break
127137
}
128138
}

0 commit comments

Comments
 (0)