Stress test usability feedback (#3032)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
parent
413b4b7665
commit
35c4a7eb32
@ -12,7 +12,10 @@ param(
|
||||
[switch]$Login,
|
||||
|
||||
[Parameter(ParameterSetName = 'DoLogin')]
|
||||
[string]$Subscription
|
||||
[string]$Subscription,
|
||||
|
||||
# Default to true in Azure Pipelines environments
|
||||
[switch] $CI = ($null -ne $env:SYSTEM_TEAMPROJECTID)
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
@ -88,7 +91,7 @@ function DeployStressTests(
|
||||
Run helm repo update
|
||||
if ($LASTEXITCODE) { return $LASTEXITCODE }
|
||||
|
||||
$pkgs = FindStressPackages $searchDirectory $filters
|
||||
$pkgs = FindStressPackages $searchDirectory $filters $CI
|
||||
Write-Host "" "Found $($pkgs.Length) stress test packages:"
|
||||
Write-Host $pkgs.Directory ""
|
||||
foreach ($pkg in $pkgs) {
|
||||
@ -106,6 +109,8 @@ function DeployStressTests(
|
||||
}
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "`nStress test telemetry links (dashboard, fileshare, etc.): https://aka.ms/azsdk/stress/dashboard"
|
||||
}
|
||||
|
||||
function DeployStressPackage(
|
||||
|
||||
@ -9,7 +9,7 @@ class StressTestPackageInfo {
|
||||
[string]$ReleaseName
|
||||
}
|
||||
|
||||
function FindStressPackages([string]$directory, [hashtable]$filters = @{}) {
|
||||
function FindStressPackages([string]$directory, [hashtable]$filters = @{}, [boolean]$CI = $false) {
|
||||
# Bare minimum filter for stress tests
|
||||
$filters['stressTest'] = 'true'
|
||||
|
||||
@ -18,7 +18,7 @@ function FindStressPackages([string]$directory, [hashtable]$filters = @{}) {
|
||||
foreach ($chartFile in $chartFiles) {
|
||||
$chart = ParseChart $chartFile
|
||||
if (matchesAnnotations $chart $filters) {
|
||||
$packages += NewStressTestPackageInfo $chart $chartFile
|
||||
$packages += NewStressTestPackageInfo $chart $chartFile $CI
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,9 +39,17 @@ function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) {
|
||||
return $true
|
||||
}
|
||||
|
||||
function NewStressTestPackageInfo([hashtable]$chart, [System.IO.FileInfo]$chartFile) {
|
||||
function NewStressTestPackageInfo([hashtable]$chart, [System.IO.FileInfo]$chartFile, [boolean]$CI) {
|
||||
$namespace = if ($CI) {
|
||||
$chart.annotations.namespace
|
||||
} else {
|
||||
$namespace = if ($env:USER) { $env:USER } else { "${env:USERNAME}" }
|
||||
# Remove spaces, etc. that may be in $namespace
|
||||
$namespace -replace '\W'
|
||||
}
|
||||
|
||||
return [StressTestPackageInfo]@{
|
||||
Namespace = $chart.annotations.namespace
|
||||
Namespace = $namespace
|
||||
Directory = $chartFile.DirectoryName
|
||||
ReleaseName = $chart.name
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user