Search code examples
javascriptgitazure-devopsmongoose-schemaazure-functions-core-tools

How to create VSTS CI-CD for Azure Functions (with shared javascript files) using Visual Studio Code?


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:

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?


Solution

  • Hmmm, seems that Beta really means Beta. I updated the VS Code plugin using the command line and seems to have resolved the issue. Though it did break the CI-CD that was setup. Doing a VS Code to Azure release pushed everything up. I'm yet to reconfig the TSVS CI-CD.

    Azure Functions 2.0 Not Loading Referenced Libraries