Skip to content

Commit f2f1e98

Browse files
azure-sdkbenbp
andauthored
Sync eng/common directory with azure-sdk-tools for PR 9687 (#39367)
* Migrate stress storage cluster * Add tenant to stress deploy login --------- Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
1 parent 7e02ccc commit f2f1e98

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

eng/common/scripts/stress-testing/deploy-stress-tests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ param(
1010
[string]$DeployId,
1111
[switch]$SkipLogin,
1212
[string]$Subscription,
13+
[string]$Tenant,
1314

1415
# Default to true in Azure Pipelines environments
1516
[switch] $CI = ($null -ne $env:SYSTEM_TEAMPROJECTID),

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ function RunOrExitOnFailure()
4343
}
4444
}
4545

46-
function Login([string]$subscription, [string]$clusterGroup, [switch]$skipPushImages)
46+
function Login([string]$subscription, [string]$tenant, [string]$clusterGroup, [switch]$skipPushImages)
4747
{
4848
Write-Host "Logging in to subscription, cluster and container registry"
4949
az account show -s "$subscription" *> $null
5050
if ($LASTEXITCODE) {
51-
RunOrExitOnFailure az login --allow-no-subscriptions
51+
RunOrExitOnFailure az login --allow-no-subscriptions --tenant $tenant
5252
}
5353

5454
# Discover cluster name, only one cluster per group is expected
@@ -116,24 +116,27 @@ function DeployStressTests(
116116
}
117117
$clusterGroup = 'rg-stress-cluster-pg'
118118
$subscription = 'Azure SDK Developer Playground'
119+
$tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47'
119120
} elseif ($environment -eq 'prod') {
120121
if ($clusterGroup -or $subscription) {
121122
Write-Warning "Overriding cluster group and subscription with defaults for 'prod' environment."
122123
}
123124
$clusterGroup = 'rg-stress-cluster-prod'
124125
$subscription = 'Azure SDK Test Resources - TME'
126+
$tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d'
125127
} elseif ($environment -eq 'storage') {
126128
if ($clusterGroup -or $subscription) {
127129
Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment."
128130
}
129131
$clusterGroup = 'rg-stress-cluster-storage'
130-
$subscription = 'XClient'
131-
} elseif (!$clusterGroup -or !$subscription) {
132-
throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod."
132+
$subscription = 'Azure SDK Test Resources - TME'
133+
$tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47'
134+
} elseif (!$clusterGroup -or !$subscription -or $tenant) {
135+
throw "-ClusterGroup, -Subscription and -Tenant parameters must be specified when deploying to an environment that is not pg or prod."
133136
}
134137

135138
if (!$skipLogin) {
136-
Login -subscription $subscription -clusterGroup $clusterGroup -skipPushImages:$skipPushImages
139+
Login -subscription $subscription -tenant $tenant -clusterGroup $clusterGroup -skipPushImages:$skipPushImages
137140
}
138141

139142
$chartRepoName = 'stress-test-charts'

0 commit comments

Comments
 (0)