Support regex/negative regex filters for stress test discovery. Add storage env defaults (#5779)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2024-07-11 13:25:01 -04:00 committed by GitHub
parent b1207fc87a
commit 1143b6bf4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -75,7 +75,7 @@ function ParseChart([string]$chartFile) {
function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) {
foreach ($filter in $filters.GetEnumerator()) {
if (!$chart["annotations"] -or $chart["annotations"][$filter.Key] -ne $filter.Value) {
if (!$chart["annotations"] -or $chart["annotations"][$filter.Key] -notmatch $filter.Value) {
return $false
}
}

View File

@ -122,6 +122,12 @@ function DeployStressTests(
}
$clusterGroup = 'rg-stress-cluster-prod'
$subscription = 'Azure SDK Test Resources'
} elseif ($environment -eq 'storage') {
if ($clusterGroup -or $subscription) {
Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment."
}
$clusterGroup = 'rg-stress-cluster-storage'
$subscription = 'XClient'
} elseif (!$clusterGroup -or !$subscription) {
throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod."
}