I have followed this documentation: https://learn.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:
- Use Python 3.7
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
- Publish Artifact: drop, Path to publish: $(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip