Step 21 - Deploy Azure Function - Build
  • 18 Nov 2019
  • 1 Minute to read
  • Contributors
  • Comment
  • Dark
    Light
  • PDF

Step 21 - Deploy Azure Function - Build

  • Comment
  • Dark
    Light
  • PDF

Article summary

In this task we will take the zip file that was produced by the publish of the Visual Studio solution for the Function App and it will deploy it to Azure.

When we setup the infrastructure if you remember from earlier in this article I talked about the Terraform files and how they setup some of the configuration settings for the function app within Terraform. An example of this was the AppInsights key and SQL connection string. This allowed my to deal with thise dynamics settings within the script.

In this Azure DevOps tasks I can also override the settings that were setup earlier and I can also add other new settings if any have appeared at this point. This gives me a lot of flexibility for different potential scenarios.

A picture of the configuration of the task is below:

image.png

YAML

The yaml for this task is below:

variables:
  functionAppName: '[TBC]'

steps:
- task: AzureFunctionApp@1
  displayName: 'Azure Function App Deploy: $(functionAppName)'
  inputs:
    azureSubscription: '[TBC]'
    appType: functionApp
    appName: '$(functionAppName)'
    package: '$(Build.StagingDirectory)\ci-Build\HelperAPI.zip'
    deploymentMethod: zipDeploy


Was this article helpful?