Continuous Integration Using Azure DevOps

Azure Pipelines are used for continuously building, testing, and deploying code and applications to any platform and cloud solution. Developers can create a cloud-hosted pipeline for Windows, Linux, and macOS. Further, they can automate build, and deploy processes using Azure DevOps (Azure Pipelines are much faster when compared to VSTS). In this programming tutorial, we will demonstrate Azure Pipelines creation and how to use them to implement continuous integration for a .NET Web Application.

Pipeline Using Azure DevOps

To start, login to your Azure DevOps account and choose Pipelines, Builds:

Azure Devops Continuous Integration

Azure DevOps Account Overview

For first time users, you can also select the New Pipeline button, as shown in the following figure:

Azure DevOps New Pipeline

Azure DevOps Pipeline

Click Create Pipeline to create your first Pipeline:

Creating an Azure DevOps Pipeline

Azure DevOps Create New Pipeline

Select your repository type, for which you want to set-up a build. For the following example, we have selected the Other Git Repository option:

Azure DevOps Code Repository

Azure DevOps Code Repository

To connect the Git Repository, add the URL and enter your Username and Password:

Azure DevOps Connect Git Repository

Azure DevOps Connect Git Repository

After you successfully login to Git, select the Branch as depicted here:

Azure DevOps template

Azure DevOps Code Branch Selection

Azure DevOps Pipeline has many pre-defined templates to choose from, based on the needs of the developer or project. In this example, we have selected the ASP.NET Template and clicked Apply:

Azure DevOps Template

Azure DevOps Pre Defined Template

The following template has five configuration steps: Tasks, Variables, Triggers, Option, and Retention. Configure each of these steps before moving on:

Azure DevOps Template Configuration

Azure DevOps Template Configuration

Next, run the Pipeline using a trigger setting, or, we can schedule the build time. Developers can set the continuous integration during any new check-in process. You can also specify a scheduled day and time to autorun the build. You can see here when to build and branch filters where you can include or exclude a specific branch:

Azure DevOps Pipelines

Azure DevOps Run Pipeline

Step-by-step execution logs and all of the jobs and tasks can be viewed in real-time. Once all jobs are executed successfully, you can see the result on the Builds dashboard:

Azure DevOps Build Log

Azure DevOps Build Log

Developers can see the build history by clicking the History tab. If you want to see the progression, click on the build number from the grid and it will display all the progression.

You can see the build artifact’s published details, build Pipelines status and associated changes for the latest changes or latest build as well. Azure DevOps also supports Git Repository – you can add code as depicted below:

Azure DevOps Clone Repo

Azure DevOps Clone Repo

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read