Skip to content

Commit

Permalink
Add AdditionalMatrixConfigs the CIMatrixConfigs (#24067)
Browse files Browse the repository at this point in the history
Co-authored-by: James Suplizio <[email protected]>
  • Loading branch information
azure-sdk and JimSuplizio authored Feb 6, 2025
1 parent 0039076 commit 8e52f75
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,20 @@ class PackageProps {
$result = [PSCustomObject]@{
ArtifactConfig = [HashTable]$artifactForCurrentPackage
MatrixConfigs = @()
AdditionalMatrixConfigs = @()
}

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

if ($matrixConfigList) {
$result.MatrixConfigs = $matrixConfigList
$result.MatrixConfigs += $matrixConfigList
}

$additionalMatrixConfigList = GetValueSafelyFrom-Yaml $content @("extends", "parameters", "AdditionalMatrixConfigs")

if ($additionalMatrixConfigList) {
$result.AdditionalMatrixConfigs += $additionalMatrixConfigList
}

return $result
Expand All @@ -123,6 +130,9 @@ class PackageProps {
$this.CIMatrixConfigs = $ciArtifactResult.MatrixConfigs
# if this package appeared in this ci file, then we should
# treat this CI file as the source of the Matrix for this package
if ($ciArtifactResult.PSObject.Properties.Name -contains "AdditionalMatrixConfigs" -and $ciArtifactResult.AdditionalMatrixConfigs) {
$this.CIMatrixConfigs += $ciArtifactResult.AdditionalMatrixConfigs
}
break
}
}
Expand Down

0 comments on commit 8e52f75

Please sign in to comment.