使用Azure DevOps部署Azure函数(Python 3.7)-错误500

问题描述 投票:0回答:1

我已遵循此文档:https://docs.microsoft.com/bs-latn-ba/azure/azure-functions/functions-how-to-azure-devops,但是调用该函数时出现500内部服务器错误。但是,使用VSCode,我可以使用相同的代码进行部署。此错误说明该函数如何找不到导入的库。

GitHub结构目录:

app-functions/rt-function/HTTPTrigger
app-functions/rt-function/HTTPTriggerStable
app-functions/rt-function/requirements.txt

CI:

  1. 使用Python 3.7
  2. 带有内联内容的Bash脚本:

    cd ./app-functions/rt-function/如果[-f extensions.csproj]然后dotnet build extensions.csproj --output ./bin科幻pip install --target =“ ./。python_packages / lib / site-packages” -r ./requirements.txt

  3. 归档app-functions / rt-function,要归档的根文件夹或文件:app-functions / rt-function和要创建的归档文件:$(System.DefaultWorkingDirectory)/ build $(Build.BuildId).zip] >

  4. [发布工件:放置,要发布的路径:$(System.DefaultWorkingDirectory)/ build $(Build.BuildId).zip

我已遵循此文档:https://docs.microsoft.com/bs-latn-ba/azure/azure-functions/functions-how-to-azure-devops,但是调用时出现500 Internal Server Error功能。但是,...

azure deployment azure-devops azure-functions
1个回答
0
投票

为了使答案对其他人可见,我总结了评论中共享的答案:

© www.soinside.com 2019 - 2024. All rights reserved.