Fix azure.yaml to use language: js for azd deploy support#12
Open
ggailey777 wants to merge 2 commits intoAzure-Samples:mainfrom
Open
Fix azure.yaml to use language: js for azd deploy support#12ggailey777 wants to merge 2 commits intoAzure-Samples:mainfrom
language: js for azd deploy support#12ggailey777 wants to merge 2 commits intoAzure-Samples:mainfrom
Conversation
c6f86fb to
91ed5c2
Compare
The postprovision hook ran 'func azure functionapp publish' to deploy. With a services block using 'language: js', azd deploy handles this natively via the generic ZIP packager. The deploy scripts are no longer needed. The actual runtime is set by FUNCTIONS_WORKER_RUNTIME=powershell in Bicep.
91ed5c2 to
5f2cb10
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The azd CLI does not have a built-in framework packager for PowerShell.
Using
language: powershellcausesazd deployto fail, and usinglanguage: customwithdist:requires alpha opt-in.This PR changes the service language to
js, which uses the generic ZIPpackager that works correctly for any Functions runtime. The actual runtime
is determined by the
FUNCTIONS_WORKER_RUNTIMEapp setting (set topowershellin Bicep), not by this field.See also: Azure/azure-dev#4538
Changes
Set
language: jsin theservicesblock ofazure.yamlAdded explanatory comment
Removed
postprovisionhook (no longer needed —azd deployhandles deployment)Deleted
scripts/deploy.ps1andscripts/deploy.sh