我正在尝试使用功能应用程序的kudu zip push部署从CLI更新App Function
中的代码。
我正在使用此命令-
az functionapp deployment source config-zip --name funcApp1 --resource-group MyGroup --src C:\Users\user\Documents\funcApp1.zip
并获得此输出-
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
看起来好像可以,但是在CLI中App Function
中看不到更新的代码。
可能是什么问题?
答案 0 :(得分:0)
似乎您使用了错误的命令。
看看这个:https://docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#cli
命令应为:
az functionapp deployment source config-zip -g <resource_group> -n <app_name> --src <zip_file_path>
答案 1 :(得分:0)
面对同样的问题,我正在使用以下命令
az functionapp deployment source config-zip -g clitesting4 -n zeroclitrigger --src D:\latestcli\functionapp.zip --build-remote true
我认为这与文件夹结构或某些文件丢失问题有关,因为我的运行时是python,我正在使用以下文件夹结构。
__app__
| - MyFirstFunction
| | - __init__.py
| | - function.json
| | - example.py
| - MySecondFunction
| | - __init__.py
| | - function.json
| - SharedCode
| | - myFirstHelperFunction.py
| | - mySecondHelperFunction.py
| - host.json
| - requirements.txt
tests
我从vscode获得的所有文件。我没有使用任何 ARM模板
答案 2 :(得分:0)
唯一对我们有用的是不使用 azure 管道的命令:
func azure functionapp publish "<function_name>" --python