Allow default matrix selection override (#6128)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Родитель
2663592767
Коммит
bcaaa3bfdb
|
@ -48,11 +48,21 @@ function FindStressPackages(
|
||||||
|
|
||||||
VerifyAddonsVersion $chart $chartFile
|
VerifyAddonsVersion $chart $chartFile
|
||||||
|
|
||||||
|
# Default to "sparse" matrix selection type, unless a default is specified
|
||||||
|
# in Chart.yaml annotations, or an override is passed in from the command line
|
||||||
|
$selection = if ($MatrixSelection) {
|
||||||
|
$MatrixSelection
|
||||||
|
} elseif ($chart['annotations'] -and $chart['annotations']['matrixSelection']) {
|
||||||
|
$chart['annotations']['matrixSelection']
|
||||||
|
} else {
|
||||||
|
"sparse"
|
||||||
|
}
|
||||||
|
|
||||||
$matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName)
|
$matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName)
|
||||||
if (Test-Path $matrixFilePath) {
|
if (Test-Path $matrixFilePath) {
|
||||||
GenerateScenarioMatrix `
|
GenerateScenarioMatrix `
|
||||||
-matrixFilePath $matrixFilePath `
|
-matrixFilePath $matrixFilePath `
|
||||||
-Selection $MatrixSelection `
|
-Selection $selection `
|
||||||
-DisplayNameFilter $MatrixDisplayNameFilter `
|
-DisplayNameFilter $MatrixDisplayNameFilter `
|
||||||
-Filters $MatrixFilters `
|
-Filters $MatrixFilters `
|
||||||
-Replace $MatrixReplace `
|
-Replace $MatrixReplace `
|
||||||
|
|
|
@ -103,7 +103,7 @@ function DeployStressTests(
|
||||||
[Parameter(Mandatory=$False)][switch]$Template,
|
[Parameter(Mandatory=$False)][switch]$Template,
|
||||||
[Parameter(Mandatory=$False)][switch]$RetryFailedTests,
|
[Parameter(Mandatory=$False)][switch]$RetryFailedTests,
|
||||||
[Parameter(Mandatory=$False)][string]$MatrixFileName,
|
[Parameter(Mandatory=$False)][string]$MatrixFileName,
|
||||||
[Parameter(Mandatory=$False)][string]$MatrixSelection = "sparse",
|
[Parameter(Mandatory=$False)][string]$MatrixSelection,
|
||||||
[Parameter(Mandatory=$False)][string]$MatrixDisplayNameFilter,
|
[Parameter(Mandatory=$False)][string]$MatrixDisplayNameFilter,
|
||||||
[Parameter(Mandatory=$False)][array]$MatrixFilters,
|
[Parameter(Mandatory=$False)][array]$MatrixFilters,
|
||||||
[Parameter(Mandatory=$False)][array]$MatrixReplace,
|
[Parameter(Mandatory=$False)][array]$MatrixReplace,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче