Restore deploymentOutputs variable in scope for post deployment script (#3153)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2021-12-02 12:01:54 -08:00 committed by GitHub
parent 98d9664dc9
commit 575af58bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {