@@ -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