Setup CI/CD process in Azure DevOps for Azure Functions(Consumption plan) and ASP.NET Core Web Api(App Service) that are located in the same Azure DevOps repository

H_Gozo 21 Reputation points
2021-09-17T06:44:13.977+00:00

How to setup CI/CD process in Azure DevOps for Azure Functions(Consumption plan) and ASP.NET Core Web Api(App Service) that are located in the same Azure DevOps repository?
I used Template-base pipeline (https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-azure-devops?tabs=csharp%2Cwindows#template-based-pipeline) for Azure Functions but it works only for one Function App. But I have more than one Function App in repository as well as ASP.NET Core Web Api

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,519 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,312 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andriy Bilous 11,011 Reputation points MVP
    2021-09-17T08:17:08.38+00:00

    Hello @H_Gozo

    You would like to use CI/CD process for monorepo software development strategy in Azure Devops.
    Your Project Structure and YAML files could be organized in following way:
    133071-image.png

    In Azure DevOps repository you will have 2 different pipeline files:

    • azure-pipelines-a.yml
    • azure-pipelines-b.yml

    These YAML files will have triggers and paths. Example for azure-pipelines-a.yml

    trigger:  
      branches:  
        include:  
        - develop  
        - master  
      paths:  
        include:  
        - service-a  
        - azure-pipelines-a.yml  
      
    pr:  
      branches:  
        include:  
        - '*'  
      paths:  
        include:  
        - service-a  
        - azure-pipelines-a.yml  
    

    When you create a new DevOps pipeline, select the repository and on the “Configure your pipeline” page, select “Existing Azure Pipelines YAML file”, which will open up this overlay on the right:
    133072-image.png

    https://julie.io/writing/monorepo-pipelines-in-azure-devops/
    https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema#push-trigger

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful