question

HGozo-0855 avatar image
0 Votes"
HGozo-0855 asked AndriyBilous answered

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

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://docs.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-functionsdotnet-aspnet-core-mvc
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AndriyBilous avatar image
1 Vote"
AndriyBilous answered

Hello @HGozo-0855

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://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema#push-trigger



image.png (2.3 KiB)
image.png (30.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.