Hello Microsoft community. I am facing currently an issue with a deployment of Azure Function from GitLab CI/CD pipeline.
Given:
Following project structure:
-project
----src
----------
python_module
--------------------
some python code
----------
dummy-azure-func
--------------------
TimerTrigger1
--------------------
host.json
--------------------
...
----tests
----README.md
----...
GitLab CI/CD pipeline
default:
image: python:3.9
azure-function-deploy:
stage: deploy
script:
- apt-get update; apt-get install curl
- curl -sL https://aka.ms/InstallAzureCLIDeb | bash
- apt-get install curl && curl -sL https://deb.nodesource.com/setup_12.x | bash -
- apt-get install nodejs
- npm install -g azure-functions-core-tools@4 --unsafe-perm true
- az login --service-principal -u $AZ_DEPLOY_CLIENT_ID -p $AZ_DEPLOY_SECRET --tenant $AZ_DEPLOY_TENANT_ID
- func azure functionapp publish at-dummy-azure-func --python --prefix src/dummy-azure-func/
Expected: Successful deployment
Reality: Last "publish" command leads to the error "Unable to find project root. Expecting to find one of host.json in project root."
Executing the last command "func azure ..." on Win10 locally from "project" folder, deploys the Azure Function successfully. What shows that --prefix argument is working correctly, which is also running on GitLab
Had someone already experiences with deployment with "special" project structure?