I'm trying to use Visual Studio code to create a Azure Function micro-service (javascript and Functions v2) that I push to my VSTS account, that then triggers a CI-CD to Azure functions.
How do I configure the Azure Functions CI-CD process to bring across all of the files in my VSTS git repo?
Has anyone gotten this working? Is there a better way to connect the Azure Function to a CosmosDb while having shared javascript model files (I've seen numerous examples in C# on microsoft, but not for Javascript)?
Preferred dev env: VS Code -> VSTS Git CI-CD -> Azure Function -> Azure CosmosDb
What I'm trying to achieve:
- Step 1: I did a great tutorial that gets an Angular page linking to a Azure Http Trigger Function (https://dzone.com/articles/create-a-serverless-angular-app-with-azure-functio)
- Step 2: I like Visual Studio Code and want to be able to use it to develop a more sophistacated micro-service (https://www.michaelcrump.net/azure-tips-and-tricks50/)
- Step 3: I managed to do the advised "Upload" to Azure and the functions arived and worked ... nice one old-mate! (https://www.michaelcrump.net/azure-tips-and-tricks52/)
- Step 4: I pushed my 2 Functions (one from first tutorial and the other just the standard Hello-world created in VS Code) to VSTS, and created a Azure side CI-CD pull. This works, but VSTS has no Build or Deploy scripts I can see or edit. [https://learn.microsoft.com/en-us/azure/azure-functions/functions-continuous-deployment]
- Step 5: I want to create a RESTful Azure Function microservice to use mongoose and connect to Azure CosmosDb. This is the best I can find that suggests how using Azure CLI. (http://thecodebarbarian.com/getting-started-with-azure-functions-and-mongodb.html)
- Step 6: I want to have a shared model files as the microservice becomes more sophisticated. (How to share code in JavaScript Azure Functions?)
Problem ... The CI-CD I setup in Azure Function isn't bringing my shared sub-directory over and therefore the entire Function breaks. The CI-CD in VSTS doesn't include any details of the CI-CD Build and Release steps in the VSTS web UI (no processes are setup).
How do you create a shared subdirectory between functions?