I have followed this documentation: https://docs.microsoft.com/bs-latn-ba/azure/azure-functions/functions-how-to-azure-devops but I get a 500 Internal Server Error when I invoke the function. However, using VSCode I could deploy it using the same code. This error explains how the function can not find the imported libs.
GitHub structure directory:
app-functions/rt-function/HTTPTrigger
app-functions/rt-function/HTTPTriggerStable
app-functions/rt-function/requirements.txt
CI:
Bash Script with inline content:
cd./app-functions/rt-function/ if [ -f extensions.csproj ] then dotnet build extensions.csproj --output./bin fi pip install --target="./.python_packages/lib/site-packages" -r./requirements.txt
Archive app-functions/rt-function, Root folder or file to archive:app-functions/rt-function and Archive file to create:$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip
To make the answer visible to others, I'm summarizing the answer shared in comment:
The root cause for this issue is that folder structure was incorrect .
Reference:
An similar issue here .
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.