Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create app services for feature branches dynamically in Azure DevOps

I'm working on an API in core3.1. We have a build pipeline that builds and unit tests any change for any branch. And release pipelines for development and master branches. These deploy to designated app services in Azure.

Now we would like a release pipeline for feature branches. So what we want is a pipeline that can dynamically created app-services per feature branch and deploy to that app service. And preferably dynamically delete the app-service when the branch is deleted.

Just to clarify, the proces how we would like it:

a developer creates feature branch and pushes it > 
the build pipeline builds it > 
an app service gets created automatically > 
stuff gets deployed to that app service > 
developers work on the branch and changes get build and deployed to the app service like normal > 
at some later point a developer deletes branch > 
app service gets deleted automaticcaly

Is there any way to accomplish this? Maybe there is a standard way? Feature branches are located in a subfolder, e.g. "feat/feature-branch-name". I'm fairly new to Azure and DevOps. Any help is appriciated. Thanks in advance.

like image 484
Martijn Avatar asked Oct 24 '25 03:10

Martijn


1 Answers

You should follow the practice of Infrastructure as Code (IaC) and use ARM templates in your pipeline to create/update/delete your Azure resources. You can also use the built-in tasks available in Azure DevOps to deploy your ARM templates.

like image 77
Hugo Barona Avatar answered Oct 26 '25 00:10

Hugo Barona



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!