Sync eng/common directory with azure-sdk-tools for PR 3491 (#3781)

* stress test script and docs migration from test to pg cluster

* comments for stress-test-deployment-lib script

Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
This commit is contained in:
Azure SDK Bot 2022-06-29 16:52:10 -07:00 коммит произвёл GitHub
Родитель 6ab413955c
Коммит 3d62767b5e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -63,7 +63,8 @@ function Login([string]$subscription, [string]$clusterGroup, [switch]$pushImages
function DeployStressTests( function DeployStressTests(
[string]$searchDirectory = '.', [string]$searchDirectory = '.',
[hashtable]$filters = @{}, [hashtable]$filters = @{},
[string]$environment = 'test', # Default to playground environment
[string]$environment = 'pg',
[string]$repository = '', [string]$repository = '',
[switch]$pushImages, [switch]$pushImages,
[string]$clusterGroup = '', [string]$clusterGroup = '',
@ -80,11 +81,11 @@ function DeployStressTests(
})] })]
[System.IO.FileInfo]$LocalAddonsPath [System.IO.FileInfo]$LocalAddonsPath
) { ) {
if ($environment -eq 'test') { if ($environment -eq 'pg') {
if ($clusterGroup -or $subscription) { if ($clusterGroup -or $subscription) {
Write-Warning "Overriding cluster group and subscription with defaults for 'test' environment." Write-Warning "Overriding cluster group and subscription with defaults for 'pg' environment."
} }
$clusterGroup = 'rg-stress-cluster-test' $clusterGroup = 'rg-stress-cluster-pg'
$subscription = 'Azure SDK Developer Playground' $subscription = 'Azure SDK Developer Playground'
} elseif ($environment -eq 'prod') { } elseif ($environment -eq 'prod') {
if ($clusterGroup -or $subscription) { if ($clusterGroup -or $subscription) {
@ -96,7 +97,7 @@ function DeployStressTests(
if ($login) { if ($login) {
if (!$clusterGroup -or !$subscription) { if (!$clusterGroup -or !$subscription) {
throw "clusterGroup and subscription parameters must be specified when logging into an environment that is not test or prod." throw "clusterGroup and subscription parameters must be specified when logging into an environment that is not pg or prod."
} }
Login -subscription $subscription -clusterGroup $clusterGroup -pushImages:$pushImages Login -subscription $subscription -clusterGroup $clusterGroup -pushImages:$pushImages
} }