Release Pipelines | Azure DevOps

Sachin Modi
4 min readJan 15, 2021

Here we will see how to automate the deployment process of a web application using Azure DevOps.

To do this exercise , I already have .Net Core Web application in my local machine, so first I will push this code onto Azure Repos and then we will create pipeline to build and release on various servers.

you would need to create a repos on azure devops to do this, login to azure devops → go to organisation → go to project and then click on Repos and then click on New Repository.

Now we will push the code base onto azure Repos using GIT command.

open the cmd → go to project folder and run the below commands.

git init

git add .

git commit -m “Initial Commit”

git remote add master https://*****@dev.azure.com/******/Project1/_git/*****Repository
git push -u master — all

Once you push the code base onto Azure Repos then click on pipelines.

click on New pipeline → Select Azure Repos Git →Select your repository →

and add the publish task in your pipeline yaml file → now click on save and run.

Now click on job, the job should successfully completed and it should generate the build artifacts.

Now I will be creating the release pipeline to deploy the build artifacts on various servers, to do this, click on Pipelines → Release → New Release pipeline and click on Empty job.

Now I will be adding the build artifacts and stages to deploy on servers. Here I have enable the continuous deployment to trigger whenever there is a new build.

Now click on stage and add the task “App Service Deploy” and click on save.

I have added another stage to automate the process to deploy the application on higher level of server.

now you can add the task similarly how I have added for QA stage.

Now you can add pre deployment condition and click on save to deploy into next stage.

Now I have gone ahead and clicked on edit the index.html page and clicked on commit.

As soon as I clicked on commit, it automatically triggered the build and release pipelines.

See above image, QA deployment succeeded however before deploying to Production, it is asking for approval, because we have configured the pre deployment approval in release pipeline.

Now I have go ahead and clicked on approve so that it gets deployed in next stage. Please refer the below image, it has deployed into Production stage as well.

--

--