From ecbd315ae7ac6bdaa730cfd4f080de5592ead272 Mon Sep 17 00:00:00 2001 From: VishalSh-Microsoft Date: Thu, 23 Jul 2026 15:30:10 +0530 Subject: [PATCH 1/3] fix: added post-deployment script/command visible in the terminal after deployment --- azure.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/azure.yaml b/azure.yaml index e472930a..d5a70dbc 100644 --- a/azure.yaml +++ b/azure.yaml @@ -38,6 +38,35 @@ hooks: printf '\n' shell: sh interactive: true + postprovision: + windows: + run: | + Write-Host "===== Provisioning Complete =====" -ForegroundColor Green + Write-Host "=> Next step: build and push container images to the dedicated ACR (remote build):" -ForegroundColor Yellow + + # Check if running from bash/MINGW64 terminal + if ($env:SHELL -like "*bash*" -or $env:TERM_PROGRAM -like "*git*" -or $env:MSYSTEM -eq "MINGW64") { + Write-Host " bash ./scripts/build_and_push_images.sh" -ForegroundColor Cyan + } else { + Write-Host " ./scripts/build_and_push_images.ps1" -ForegroundColor Cyan + } + + Write-Host "" + Write-Host "Web app URL: " -NoNewline + Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan + shell: pwsh + continueOnError: false + interactive: true + posix: + run: | + echo "===== Provisioning Complete =====" + echo "=> Next step: build and push container images to the dedicated ACR (remote build):" + echo " bash ./scripts/build_and_push_images.sh" + echo "" + echo "Web app URL: $WEB_APP_URL" + shell: sh + continueOnError: false + interactive: true deployment: mode: Incremental template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder From 59b9f4636dcc3cffeeb13a1ec2dea2f06e79b551 Mon Sep 17 00:00:00 2001 From: VishalSh-Microsoft Date: Thu, 23 Jul 2026 15:43:22 +0530 Subject: [PATCH 2/3] fix: update script paths for consistency in deployment hooks --- azure.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure.yaml b/azure.yaml index d5a70dbc..1acef96f 100644 --- a/azure.yaml +++ b/azure.yaml @@ -46,9 +46,9 @@ hooks: # Check if running from bash/MINGW64 terminal if ($env:SHELL -like "*bash*" -or $env:TERM_PROGRAM -like "*git*" -or $env:MSYSTEM -eq "MINGW64") { - Write-Host " bash ./scripts/build_and_push_images.sh" -ForegroundColor Cyan + Write-Host " bash scripts/build_and_push_images.sh" -ForegroundColor Cyan } else { - Write-Host " ./scripts/build_and_push_images.ps1" -ForegroundColor Cyan + Write-Host " .\scripts\build_and_push_images.ps1" -ForegroundColor Cyan } Write-Host "" @@ -61,7 +61,7 @@ hooks: run: | echo "===== Provisioning Complete =====" echo "=> Next step: build and push container images to the dedicated ACR (remote build):" - echo " bash ./scripts/build_and_push_images.sh" + echo " bash scripts/build_and_push_images.sh" echo "" echo "Web app URL: $WEB_APP_URL" shell: sh From 65eebfac906cd52c927bfb13c2dfe1afb7f01aa5 Mon Sep 17 00:00:00 2001 From: VishalSh-Microsoft Date: Thu, 23 Jul 2026 16:38:54 +0530 Subject: [PATCH 3/3] fix: improve web app URL retrieval in postprovision hooks --- azure.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/azure.yaml b/azure.yaml index 1acef96f..d5f84719 100644 --- a/azure.yaml +++ b/azure.yaml @@ -52,8 +52,10 @@ hooks: } Write-Host "" + $webAppUrl = $env:WEB_APP_URL + if ([string]::IsNullOrWhiteSpace($webAppUrl)) { $webAppUrl = azd env get-value WEB_APP_URL 2>$null } Write-Host "Web app URL: " -NoNewline - Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan + Write-Host "$webAppUrl" -ForegroundColor Cyan shell: pwsh continueOnError: false interactive: true @@ -63,7 +65,9 @@ hooks: echo "=> Next step: build and push container images to the dedicated ACR (remote build):" echo " bash scripts/build_and_push_images.sh" echo "" - echo "Web app URL: $WEB_APP_URL" + WEB_APP_URL_DISPLAY="$WEB_APP_URL" + if [ -z "$WEB_APP_URL_DISPLAY" ]; then WEB_APP_URL_DISPLAY=$(azd env get-value WEB_APP_URL 2>/dev/null); fi + echo "Web app URL: $WEB_APP_URL_DISPLAY" shell: sh continueOnError: false interactive: true