Skip to content

Commit d7c33c6

Browse files
Refactor deployment scripts: rename postdeploy to postprovision and streamline output variables
1 parent 4b48a18 commit d7c33c6

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

azure.yaml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,12 @@ metadata:
1111
1212

1313
hooks:
14-
postdeploy:
14+
postprovision:
1515
posix:
1616
shell: sh
17-
run: |
18-
echo "🧭 Web App Details:"
19-
echo "✅ Name: $CONTAINER_WEB_APP_NAME"
20-
echo "🌐 Endpoint: https://$CONTAINER_WEB_APP_FQDN"
21-
echo "🔗 Portal URL: https://portal.azure.com/#resource/subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$AZURE_RESOURCE_GROUP/providers/Microsoft.App/containerApps/$CONTAINER_WEB_APP_NAME"
22-
23-
echo "🧭 API App Details:"
24-
echo "✅ Name: $CONTAINER_API_APP_NAME"
25-
echo "🌐 Endpoint: https://$CONTAINER_API_APP_FQDN"
26-
echo "🔗 Portal URL: https://portal.azure.com/#resource/subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$AZURE_RESOURCE_GROUP/providers/Microsoft.App/containerApps/$CONTAINER_API_APP_NAME"
17+
run: sed -i 's/\r$//' ./infra/scripts/post_deployment.sh; ./infra/scripts/post_deployment.sh
2718
interactive: true
2819
windows:
2920
shell: pwsh
30-
run: |
31-
Write-Host "🧭 Web App Details:"
32-
Write-Host "✅ Name: $env:CONTAINER_WEB_APP_NAME"
33-
Write-Host "🌐 Endpoint: https://$env:CONTAINER_WEB_APP_FQDN"
34-
Write-Host "🔗 Portal URL: https://portal.azure.com/#resource/subscriptions/$env:AZURE_SUBSCRIPTION_ID/resourceGroups/$env:AZURE_RESOURCE_GROUP/providers/Microsoft.App/containerApps/$env:CONTAINER_WEB_APP_NAME" -ForegroundColor Cyan
35-
36-
Write-Host "🧭 API App Details:"
37-
Write-Host "✅ Name: $env:CONTAINER_API_APP_NAME"
38-
Write-Host "🌐 Endpoint: https://$env:CONTAINER_API_APP_FQDN"
39-
Write-Host "🔗 Portal URL: https://portal.azure.com/#resource/subscriptions/$env:AZURE_SUBSCRIPTION_ID/resourceGroups/$env:AZURE_RESOURCE_GROUP/providers/Microsoft.App/containerApps/$env:CONTAINER_API_APP_NAME" -ForegroundColor Cyan
21+
run: ./infra/scripts/post_deployment.ps1
4022
interactive: true

infra/main.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1367,4 +1367,4 @@ output CONTAINER_REGISTRY_NAME string = avmContainerRegistry.outputs.name
13671367
output CONTAINER_REGISTRY_LOGIN_SERVER string = avmContainerRegistry.outputs.loginServer
13681368

13691369
@description('The resource group the resources were deployed into.')
1370-
output resourceGroupName string = resourceGroup().name
1370+
output AZURE_RESOURCE_GROUP string = resourceGroup().name

infra/scripts/post_deployment.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ set -e
55

66
echo "🔍 Fetching container app info from azd environment..."
77

8-
echo "Started at: $(date)"
9-
108
# Load values from azd env
119
CONTAINER_WEB_APP_NAME=$(azd env get-value CONTAINER_WEB_APP_NAME)
1210
CONTAINER_WEB_APP_FQDN=$(azd env get-value CONTAINER_WEB_APP_FQDN)

0 commit comments

Comments
 (0)