From 575af58bfb733beb69fdf0e16baa32b47b5b48fb Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 2 Dec 2021 12:01:54 -0800 Subject: [PATCH] Restore deploymentOutputs variable in scope for post deployment script (#3153) Co-authored-by: Ben Broderick Phillips --- eng/common/TestResources/New-TestResources.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 07917f60a..900d99fbb 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -242,6 +242,8 @@ function SetDeploymentOutputs([string]$serviceName, [object]$azContext, [object] $key = $null } } + + return $deploymentOutputs } # Support actions to invoke on exit. @@ -669,7 +671,7 @@ try { Write-Verbose "Successfully deployed template '$($templateFile.jsonFilePath)' to resource group '$($resourceGroup.ResourceGroupName)'" } - SetDeploymentOutputs $serviceName $context $deployment $templateFile + $deploymentOutputs = SetDeploymentOutputs $serviceName $context $deployment $templateFile $postDeploymentScript = $templateFile.originalFilePath | Split-Path | Join-Path -ChildPath 'test-resources-post.ps1' if (Test-Path $postDeploymentScript) {