Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.

Home Page:https://aka.ms/azd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Issue] `package` hooks order

justinyoo opened this issue · comments

Output from azd version

pwsh> azd version                                                                                                                                                                       
azd version 1.8.2 (commit 14600c7a54edac4f54397413f8638431f5c16327)

Describe the bug

Currently, both prepackage and postpackage hooks are run after the up hook and before the provisioning step.

Can we run both package hooks after the postprovision hook and before the predeploy hook so that we can apply results to the deployment step, which are taken from the provisioning?

Here's an example:

I'd like to get a URL of a provisioned resource and update a config.json of a frontend app to be deployed to Static Web App. It's not possible to update config.json because the prepackage hook occurs before the provisioning step.

As a workaround, I have to run the predeploy hook script to update the config.json file.

As long as it's a plain JSON file, it's OK. However, if we need to compile binaries, the package hooks should be run in between provisioning and deployment instead of before provisioning, which makes more sense to me.

To Reproduce

N/A

Expected behavior

I was expecting that the package step would occur after the provisioning. However, it actually occurred before the provisioning.

Environment

Information on your environment:

  • OS: Windows 11

The prepackage hook doesn't even get invoked if I run azd provision or azd deploy.

@rajeshkamal5050 Thanks for the link! I found it a few days back and applied it to mine.

Hi @justinyoo. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

Hi @justinyoo, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.