Azure Functions and DevOps
    • Dark
      Light
    • PDF

    Azure Functions and DevOps

    • Dark
      Light
    • PDF

    Article Summary

    As a developer, you have several options to deploy a Function to Azure. One of the possibilities is right-clicking deploy in Visual Studio to an existing Function App in your Azure subscription – which can be an option if you quickly want to test your function in Azure. However, it is better to build locally, test, and debug your function, subsequently push it to a repro in Azure DevOps, and then execute a build pipeline.

    With Visual Studio you can tie your solution containing your function to a repro in Azure DevOps. Once your solution is in an Azure DevOps repro, you can create a build pipeline to build your function(s) in Azure using a Microsoft or self-hosted agent. When logging into Azure DevOps, you can go to Pipeline, click New Pipeline and select where your code resides (GitHub, Azure Repro Git, and so on), choose a pipeline, and then configure your pipeline, review and save it (or run it directly after save).

    Azure Function Tip 31 - Picture 1.png

    In case your run directly - observe the logs while the build is running to see if the build runs correctly. Once that is successful, you can use the build for a release pipeline to a Function App hosting your function.

    Azure Function Tip 31 - Picture 2.png
    In case you do not have Function App yet you can either have a separate release pipeline for provisioning the Function App or include the provisioning of the Function App with the release of the Function.

    Azure-functions.png


    Was this article helpful?