-1

I'm working on a app as part of univeristy project. I set up github actions to deploy the app. The action completes succesfully, but in azure, after opening the function, there are no functions listed under functions->functions tab (the table is empty).

The repo is available at: https://github.com/TomasMadeja/pa200-project-covid-registrations

Zerg Overmind
  • 955
  • 2
  • 14
  • 28

1 Answers1

-1

Functions in azure functions not showing up

try creating a pre-compiled Azure function by using following pipelines

npm install

  • Working Folder: $(System.DefaultWorkingDirectory)

dotnet build

  • Arguments: --configuration Release

Archive files

  • Root folder: $(System.DefaultWorkingDirectory)/bin/Release/netcoreapp2.1

  • Archive type: zip

  • Archive file to create: (Build.ArtifactStagingDirectory)/(Build.BuildId).zip

  • Replace existing archive: true

Note your root folder structure may be different for the path to your /bin folder. Adjust accordingly.

Azure Function App Deploy

  • (Select your subscription, app type and name)

  • Package or folder: (Build.ArtifactStagingDirectory)/(Build.BuildId).zip

The key here for me was to understand that pre-compiled Azure functions require a specific folder structure, as defined here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library#functions-class-library-project. Getting the folder/file structure is necessary to allow your functions to show in the Azure portal.

Therefore structure in the /wwwroot folder looked something like this:


| - bin  

| - MyFunction  

| - host.json  

for further information you can go through the SO

SaiSakethGuduru
  • 2,218
  • 1
  • 5
  • 15