@@ -253,8 +253,9 @@ if (-not (Test-Path $logsDir)) {
253253 New-Item - ItemType Directory - Path $logsDir - Force | Out-Null
254254}
255255$timestamp = Get-Date - Format ' yyyyMMdd-HHmmss'
256- $sourceLogFile = Join-Path $logsDir " source-deploy-$UniqueId -$timestamp .log"
257- $targetLogFile = Join-Path $logsDir " target-deploy-$UniqueId -$timestamp .log"
256+ $sourceLogFile = Join-Path $logsDir " source-deploy-$UniqueId -$timestamp .log"
257+ $targetLogFile = Join-Path $logsDir " target-deploy-$UniqueId -$timestamp .log"
258+ $compareLogFile = Join-Path $logsDir " compare-$UniqueId -$timestamp .log"
258259
259260# ---------------------------------------------------------------------------
260261# Storage for deployment outputs
@@ -600,25 +601,26 @@ try {
600601 $targetEhName = ' tgt-eh-logs'
601602
602603 $overrideFile = [System.IO.Path ]::GetFullPath((Join-Path $ExtractOutputDir ' .overrides.yaml' ))
603- $overrideYaml = @"
604- namedValues:
605- - name: src-nv-keyvault
606- properties:
607- keyVault:
608- secretIdentifier: "${targetKvUri} secrets/tgt-secret-value"
609-
610- loggers:
611- - name: src-logger-appinsights
612- properties:
613- resourceId: "$targetAiResourceId "
614- credentials:
615- instrumentationKey: "$targetAiKey "
616- - name: src-logger-eventhub
617- properties:
618- credentials:
619- name: "$targetEhName "
620- connectionString: "$targetEhConnStr "
621- "@
604+ $overrideYaml = @ (
605+ ' namedValues:'
606+ ' - name: src-nv-keyvault'
607+ ' properties:'
608+ ' keyVault:'
609+ " secretIdentifier: ${targetKvUri} secrets/tgt-secret-value"
610+ ' '
611+ ' loggers:'
612+ ' - name: src-logger-appinsights'
613+ ' properties:'
614+ " resourceId: $targetAiResourceId "
615+ ' credentials:'
616+ " instrumentationKey: $targetAiKey "
617+ ' - name: src-logger-eventhub'
618+ ' properties:'
619+ ' credentials:'
620+ " name: $targetEhName "
621+ " connectionString: $targetEhConnStr "
622+ ) -join " `n "
623+ $overrideYaml += " `n "
622624
623625 $overrideYaml | Set-Content - Path $overrideFile - Encoding utf8
624626 Write-Host " Override config written to: $overrideFile "
@@ -677,9 +679,16 @@ namedValues:
677679 ' Verbose' { $compareArgs.Verbose = $true }
678680 ' Debug' { $compareArgs.Debug = $true }
679681 }
680- & $compareScript @compareArgs
681682
682- $verifyExitCode = $LASTEXITCODE
683+ Write-Host " Compare log: $compareLogFile "
684+ Start-Transcript - Path $compareLogFile - Force - UseMinimalHeader | Out-Null
685+ try {
686+ & $compareScript @compareArgs
687+ $verifyExitCode = $LASTEXITCODE
688+ } finally {
689+ Stop-Transcript | Out-Null
690+ }
691+
683692 $verifyTimer.Stop ()
684693 $verifyDuration = $verifyTimer.Elapsed.ToString (' hh\:mm\:ss' )
685694 Write-GithubOutput ' verify_duration' $verifyDuration
0 commit comments