File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
eng/common/scripts/stress-testing Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ param(
1010 [switch ]$PushImages ,
1111 [string ]$ClusterGroup ,
1212 [string ]$DeployId ,
13-
14- [Parameter (ParameterSetName = ' DoLogin' , Mandatory = $true )]
1513 [switch ]$Login ,
16-
17- [Parameter (ParameterSetName = ' DoLogin' )]
1814 [string ]$Subscription ,
1915
2016 # Default to true in Azure Pipelines environments
Original file line number Diff line number Diff line change @@ -117,12 +117,11 @@ function DeployStressTests(
117117 }
118118 $clusterGroup = ' rg-stress-cluster-prod'
119119 $subscription = ' Azure SDK Test Resources'
120+ } elseif (! $clusterGroup -or ! $subscription ) {
121+ throw " clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod."
120122 }
121123
122124 if ($login ) {
123- if (! $clusterGroup -or ! $subscription ) {
124- throw " clusterGroup and subscription parameters must be specified when logging into an environment that is not pg or prod."
125- }
126125 Login - subscription $subscription - clusterGroup $clusterGroup - pushImages:$pushImages
127126 }
128127
@@ -160,7 +159,9 @@ function DeployStressTests(
160159 - environment $environment `
161160 - repositoryBase $repository `
162161 - pushImages:$pushImages `
163- - login:$login
162+ - login:$login `
163+ - clusterGroup $clusterGroup `
164+ - subscription $subscription
164165 }
165166
166167 if ($FailedCommands.Count -lt $pkgs.Count ) {
@@ -185,7 +186,9 @@ function DeployStressPackage(
185186 [string ]$environment ,
186187 [string ]$repositoryBase ,
187188 [switch ]$pushImages ,
188- [switch ]$login
189+ [switch ]$login ,
190+ [string ]$clusterGroup ,
191+ [string ]$subscription
189192) {
190193 $registry = RunOrExitOnFailure az acr list - g $clusterGroup -- subscription $subscription - o json
191194 $registryName = ($registry | ConvertFrom-Json ).name
You can’t perform that action at this time.
0 commit comments