Fix group prefix conditional in test resource removal (#6465)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
parent
63d575d179
commit
7a1eb828cc
@ -223,8 +223,8 @@ function Remove-WormStorageAccounts() {
|
||||
# DO NOT REMOVE THIS
|
||||
# We call this script from live test pipelines as well, and a string mismatch/error could blow away
|
||||
# some static storage accounts we rely on
|
||||
if (!$groupPrefix -or ($CI -and !$GroupPrefix.StartsWith('rg-'))) {
|
||||
throw "The -GroupPrefix parameter must not be empty, or must start with 'rg-' in CI contexts"
|
||||
if (!$groupPrefix -or ($CI -and (!$GroupPrefix.StartsWith('rg-') -and !$GroupPrefix.StartsWith('SSS3PT_rg-')))) {
|
||||
throw "The -GroupPrefix parameter must not be empty, or must start with 'rg-' or 'SSS3PT_rg-' in CI contexts"
|
||||
}
|
||||
|
||||
$groups = Get-AzResourceGroup | Where-Object { $_.ResourceGroupName.StartsWith($GroupPrefix) } | Where-Object { $_.ProvisioningState -ne 'Deleting' }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user