{{announcement.body}}
{{announcement.title}}

Setup Azure CI/CD Pipelines Using Visual Studio

DZone 's Guide to

Setup Azure CI/CD Pipelines Using Visual Studio

Take a look at this tutorial to set up a CI/CD pipeline quickly with Visual Studio.

· DevOps Zone ·
Free Resource

pipeline

Quickly create a CI/CD pipeline using Visual Studio.

Introduction

Today, we are going to see how to configure Azure DevOps CI/CD and setup Azure Pipeline using Visual Studio.

We won't be spending time on what Azure DevOps is; we are directly moving to CI/CD. Once we set up the Azure pipeline then on each check-in it will build the application and deploy the changes on App Service.

You may also enjoy:  Welcome, Azure DevOps

In this article, we will see how to configure the CI/CD for a single project in one solution. In the next article, we will see how to configure the CI/CD for multiple projects in one solution.:

For configuring the Azure DevOps CI/CD, you need the following tools.

  1. An Azure DevOps account
  2. Azure Portal Account
  3. Visual Studio 2012 or higher (in my example, I am using VS 2019)

Steps

We will see how to configure CI/CD and setup Azure Pipeline using Azure DevOps.

Step 1

Create a new project by using the Azure DevOps account. I am using Team Foundation version control, but you can use Git, too.

Create Project on Azure DevOps

Create Project on Azure DevOps

Step 2:

Configure the newly-created project in Visual Studio source control on your local system.

Configure Source Control

Configure Source Control

Step 3

Create a new project with a solution in Visual Studio and add this in the DevOps Source Control then check-in the changes.

Create a New Project with Solution

Create a New Project with Solution

Creating Project and Solution

Creating Project and Solution


Added project in Solution control

Added project in Solution control


Step 4

Setup Azure Pipelines under the publish settings of your solution.

Setup Azure Pipeline

Setup Azure Pipeline


Step 5:

Wait for a few minutes and then go to the pipelines under Azure DevOps. You will see a new Pipeline created and the build of the project has started.

DevOps Pipeline Created

DevOps Pipeline Created


Step 6

Check the Deployment Center on the Azure portal for your App Service, for which you have set up the Azure Pipeline in step 4.

Azure App Deployment Center

Azure App Deployment Center



Step 7

If there is no error in the build, then after some time your build will be finished. In my example, it took about a minute and a half.

Build Succeeded

Build Succeeded


Step 8

As the build succeeds, the new release will be created and start pushing the release changes on app service.

Release the changes

Release the changes


Step 9:

Check the app by using the URL and you will see the application has deployed.

App Service URL after First Release

App Service URL after First Release



Step 10

If you change anything in the application, check the changes and see that Azure DevOps will build the solution and release the changes.

Heading Change

Heading Change



Build has started

Build has started



After build completed the Release is created

After build completed the Release is created



Changes are deployed

Changes are deployed



We can see all releases under the Deployment Center on Azure Portal.

Azure App Deployment Center

Azure App Deployment Center



In the next article, we will see how to configure the CI/CD for multiple projects in one solution.

Topics:
azure ,cicd ,visual studio ,tfs ,tutorial ,ci cd pipeline ,devops ,microsoft azure

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}