From 7a1eb828ccdd7b2461b4c6ade084bf7bd93ce1fb Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 13 Mar 2025 16:53:02 -0700 Subject: [PATCH] Fix group prefix conditional in test resource removal (#6465) Co-authored-by: Ben Broderick Phillips --- eng/common/scripts/Helpers/Resource-Helpers.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/Helpers/Resource-Helpers.ps1 b/eng/common/scripts/Helpers/Resource-Helpers.ps1 index b152a3f21..546c5dd9a 100644 --- a/eng/common/scripts/Helpers/Resource-Helpers.ps1 +++ b/eng/common/scripts/Helpers/Resource-Helpers.ps1 @@ -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' }