Skip to content

Commit 20f3c84

Browse files
azure-sdkbenbp
andauthored
Sync eng/common directory with azure-sdk-tools for PR 9202 (#31439)
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#9202 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent 3e11a2e commit 20f3c84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eng/common/TestResources/New-TestResources.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ try {
350350
# to determine whether resources should be removed.
351351
Write-Host "Setting variable 'CI_HAS_DEPLOYED_RESOURCES': 'true'"
352352
LogVsoCommand "##vso[task.setvariable variable=CI_HAS_DEPLOYED_RESOURCES;]true"
353+
# Set resource group env variable early in cases where deployment fails as we
354+
# still want to clean up the group. The Remove-TestResources.ps1 script consumes this var.
355+
$envVarName = (BuildServiceDirectoryPrefix $serviceName) + "RESOURCE_GROUP"
356+
LogVsoCommand "##vso[task.setvariable variable=$envVarName;]$ResourceGroupName"
353357
}
354358

355359
Log "Creating resource group '$ResourceGroupName' in location '$Location'"

0 commit comments

Comments
 (0)