You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I zipped, used GitHub workflows, and vs code Azure tool as well. When I deploy my function both zip file and on using workflow get deployed without any error message (no application insight), but he one from vs code get deployed with this verdict No HTTP Triggers found. In each case I can locate application on portal and can see host.josn, package.json, every other file except the src folder gets deployed. How can I solve this problem. I tried reading dozens of issues neither of them seems to solve my problem.
#!/bin/bash# Define variables
root="./Authentication"# The root directory of the project
utput="function.zip"# The name of the zip file to be created
app="wsdemoazureb2c"# The name of the Azure Function App
rg="wsdemoazureb2c"# The name of the Resource Group
account="wsdemoazureb2c"# The name of the Storage Account# Check if the Resource Group existsecho"--> Looking for the Resource Group $rg <--"
az group show --name "$rg"&> /dev/null
if [ $?!= 0 ];thenecho"The mentioned Resource Group does no exists. Do you want to create one with the name $rg? (y/n)"read -r response
if [ "$response"="y" ];thenecho"Creating the Resource Group..."
az group create --name "$rg" --location "Central US"echo"Resource Group has been created."elseecho"The deployment has been cancelled, please modify your Resource Group name."exit 1
fifiecho"--> Resource group has been located. <--"# Check if the Function App existsecho"--> Looking for the Function App $app within the resource $rg<--"if! az functionapp show --name "$app" \
--resource-group "$rg"&> /dev/null;thenecho"No function app with the specified name exists. Do you want to create one with the name $app? (y/n)"read -r response
if [ "$response"="y" ];thenecho"Creating the Function App..."
az functionapp create \
--consumption-plan-location "centralus" \
--name "$app" \
--os-type Linux \
--resource-group "$rg" \
--storage-account "$account" \
--runtime node \
--functions-version 4
echo"Function App has been created."fielseecho"Azure function has been located."fi# Navigate to the project rootcd"$root"||exitecho"--> Looking for pre existing zip files with the same name. <--"# Check if the zip file exists and delete itif [ -f"$output" ];thenecho"A zip file with the same name exists. Do you want to delete it? (y/n)"read -r response
if [ "$response"="y" ];then
rm "$output"echo"The existing zip file has been deleted."elseecho"The deployment has been cancelled, please modify your zip name."exit 1
fifiecho"--> Zip has been created. or it already exited. <--"# Create a zip file of the necessary contents, excluding unwanted files and directoriesecho"Zipping the project files..."
7z a -tzip "$output" .\
-xr!node_modules/* \
-xr!.vscode \
-xr!~* \
-xr!.funcignore \
-xr!host-settings.json \
-xr!*.zip \
-xr!.env \
-xr!README.md
echo"Zip file has been sucessfully created."# Deploy the zip file to the Azure Function Appecho"Deploying the zip file to the Azrue Function App..."
az functionapp deployment source config-zip \
--resource-group "$rg" \
--name "$app" \
--src "$output"echo"Deployment has been completed."
The application insight is empty, by that I can assume that there doesn't occurred any error while deploying the function app. Here is screenshot from app files of the function app section.
And here is my folder structure
I can also see all the files inside the zip file.
The content you are editing has changed. Please copy your edits and refresh the page.
I zipped, used GitHub workflows, and vs code Azure tool as well. When I deploy my function both zip file and on using workflow get deployed without any error message (no application insight), but he one from vs code get deployed with this verdict No HTTP Triggers found. In each case I can locate application on portal and can see host.josn, package.json, every other file except the src folder gets deployed. How can I solve this problem. I tried reading dozens of issues neither of them seems to solve my problem.
The application insight is empty, by that I can assume that there doesn't occurred any error while deploying the function app. Here is screenshot from app files of the function app section.
And here is my folder structure
I can also see all the files inside the zip file.
Tasks
The text was updated successfully, but these errors were encountered: