简体   繁体   中英

Azure- zip push deployment for a function app doesn't work

I am trying to update the code in my App Function from the CLI using the kudu zip push deployment for a function app. I am using this command-

az functionapp deployment source config-zip --name funcApp1 --resource-group MyGroup --src C:\Users\user\Documents\funcApp1.zip

And getting this output-

Getting scm site credentials for zip deployment Starting zip deployment. This operation can take a while to complete ... Deployment endpoint responded with status code 202

It looks like it worked but I can't see the updated code in the App Function from the CLI. What can be the problem?

facing the same issue and I am using below command

az functionapp deployment source config-zip -g clitesting4 -n zeroclitrigger --src D:\latestcli\functionapp.zip --build-remote true

I think it is related to either a folder structure or some file missing issue as my runtime is python I am using below folder structure.

__app__
 | - MyFirstFunction
 | | - __init__.py
 | | - function.json
 | | - example.py
 | - MySecondFunction
 | | - __init__.py
 | | - function.json
 | - SharedCode
 | | - myFirstHelperFunction.py
 | | - mySecondHelperFunction.py
 | - host.json
 | - requirements.txt
 tests

all the files I got from vscode . I am not using any ARM template

The only thing that worked for us is without using azure pipelines is the command:

func azure functionapp publish "<function_name>" --python

docs: Azure Functions Python developer guide - Remote Build

Seems like you use the wrong command.

Have a look of this: https://docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#cli

The command should be:

az functionapp deployment source config-zip -g <resource_group> -n <app_name> --src <zip_file_path>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM