Skip to content

Commit 3fa79e3

Browse files
azure-sdkbenbp
andauthored
Allow default matrix selection override (Azure#1872)
Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent 374aacd commit 3fa79e3

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

eng/common/scripts/stress-testing/find-all-stress-packages.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,21 @@ function FindStressPackages(
4848

4949
VerifyAddonsVersion $chart $chartFile
5050

51+
# Default to "sparse" matrix selection type, unless a default is specified
52+
# in Chart.yaml annotations, or an override is passed in from the command line
53+
$selection = if ($MatrixSelection) {
54+
$MatrixSelection
55+
} elseif ($chart['annotations'] -and $chart['annotations']['matrixSelection']) {
56+
$chart['annotations']['matrixSelection']
57+
} else {
58+
"sparse"
59+
}
60+
5161
$matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName)
5262
if (Test-Path $matrixFilePath) {
5363
GenerateScenarioMatrix `
5464
-matrixFilePath $matrixFilePath `
55-
-Selection $MatrixSelection `
65+
-Selection $selection `
5666
-DisplayNameFilter $MatrixDisplayNameFilter `
5767
-Filters $MatrixFilters `
5868
-Replace $MatrixReplace `

eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function DeployStressTests(
103103
[Parameter(Mandatory=$False)][switch]$Template,
104104
[Parameter(Mandatory=$False)][switch]$RetryFailedTests,
105105
[Parameter(Mandatory=$False)][string]$MatrixFileName,
106-
[Parameter(Mandatory=$False)][string]$MatrixSelection = "sparse",
106+
[Parameter(Mandatory=$False)][string]$MatrixSelection,
107107
[Parameter(Mandatory=$False)][string]$MatrixDisplayNameFilter,
108108
[Parameter(Mandatory=$False)][array]$MatrixFilters,
109109
[Parameter(Mandatory=$False)][array]$MatrixReplace,

0 commit comments

Comments
 (0)