Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] allow to choose when build/packaging step occurs in the lifecycle #2850

Closed
1 task done
sinedied opened this issue Oct 10, 2023 · 4 comments
Closed
1 task done
Assignees
Milestone

Comments

@sinedied
Copy link
Member

Output from azd version

azd version
azd version 1.4.1 (commit 1cbed85cf47ed235b5ed31868eda79619525bfcc)

Describe the issue
In microservices architectures where the frontend is deployed as a separate component, you need to get the backend/API location after the provisioning as the backend URL need to be provided at build time for static web apps.

We have the case for example in https://github.com/Azure-Samples/contoso-real-estate and https://github.com/Azure-Samples/azure-search-openai-javascript.

In the first sample, azd up cannot be used because of this, and it needs to run azd provision then azd deploy as a workaround.

In the second sample, we used a different workaround so that azd up could be used: we added a "predeploy" script to build the app just before deployment, but that effectively cause the app to be built twice.

This is a very common use case and it feels hacky to have to make twists like these to make it work.

Would it be possible to consider a step property under a build or package settings to define when the command should be ran? For example:

services:
  webapp:
    project: ./packages/webapp
    dist: dist
    language: ts
    host: staticwebapp
    package:
      step: predeploy
@pamelafox
Copy link
Member

We would like this for the Python OpenAI sample as well.

@savannahostrowski
Copy link
Contributor

@ellismg We talked about this briefly this morning but I could imagine a world where azure.yaml allows you to specify what happens in azd up

@savannahostrowski
Copy link
Contributor

@rajeshkamal5050 based on the convo we had about extensibility a couple weeks ago, I've moved this to January.

@wbreza
Copy link
Contributor

wbreza commented Nov 9, 2023

POC in development #3173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants