From 667534fa2cf7e0b501ab6bddede55bbbd6051a0e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 27 Aug 2021 16:07:22 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 1943 (#20450) * Bug fix: Storing .env file for bicep file at service dir * Styling Co-authored-by: Albert Cheng --- eng/common/TestResources/New-TestResources.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index e2a4ef125d6e..fa75730dcd2d 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -477,7 +477,13 @@ try { &$preDeploymentScript -ResourceGroupName $ResourceGroupName @PSBoundParameters } - Log "Deploying template '$($templateFile.originalFilePath)' to resource group '$($resourceGroup.ResourceGroupName)'" + $msg = if ($templateFile.jsonFilePath -ne $templateFile.originalFilePath) { + "Deployment template $($templateFile.jsonFilePath) from $($templateFile.originalFilePath) to resource group $($resourceGroup.ResourceGroupName)" + } else { + "Deployment template $($templateFile.jsonFilePath) to resource group $($resourceGroup.ResourceGroupName)" + } + Log $msg + $deployment = Retry { $lastDebugPreference = $DebugPreference try { @@ -538,7 +544,7 @@ try { Write-Host 'File option is supported only on Windows' } - $outputFile = "$($templateFile.jsonFilePath).env" + $outputFile = "$($templateFile.originalFilePath).env" $environmentText = $deploymentOutputs | ConvertTo-Json; $bytes = ([System.Text.Encoding]::UTF8).GetBytes($environmentText)