Skip to content

Commit

Permalink
Update hooks for azd 0.8.0
Browse files Browse the repository at this point in the history
azd version 0.8.0 packs the application before creating azure resources (when running azd up)
Then `azd deploy` use the output from that packing to publish the app to Azure.
The `predeploy` hook is not valid anymore on this scenario to include the frontend to the backend. Instead, we need to switch to use `prepackage` for the backend service, so the frontend is attached before creating the package.
  • Loading branch information
vhvb1989 authored and chuwik committed Apr 13, 2023
1 parent 1945589 commit 40e5478
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ services:
project: ./app/backend
language: py
host: appservice
hooks:
prepackage:
windows:
shell: pwsh
run: cd ../frontend;npm install;npm run build
interactive: true
continueOnError: false
posix:
shell: sh
run: cd ../frontend;npm install;npm run build
interactive: true
continueOnError: false
hooks:
postprovision:
windows:
Expand All @@ -20,14 +32,3 @@ hooks:
run: ./scripts/prepdocs.sh
interactive: true
continueOnError: false
predeploy:
windows:
shell: pwsh
run: cd ./app/frontend;npm install;npm run build
interactive: true
continueOnError: false
posix:
shell: sh
run: cd ./app/frontend;npm install;npm run build
interactive: true
continueOnError: false

0 comments on commit 40e5478

Please sign in to comment.