Configure CI / CD Pipe line with Azure App Service and Azure DevOps

Lahiru TharangaLahiru Tharanga
2 min read

This article will show about step by step process of configuring CI / CD Pipe line in Azure DevOps. In this case I have used Azure free services such as DevOps and App Service.

You can easily create a Azure account and DevOps account from the below links.

Azure App service is a free service which can be created from the Azure portal(https://portal.azure.com).

image.png

image.png

image.png

When you commit your code into Azure Git Repo, it will build and release to particular environment without releasing manual process.

After the App Service, you can easily create a new DevOps Project as below. (https://dev.azure.com)

image.png

In this article I will not mention about basic principles of DevOps. I mainly focus about how to create and configure CI/CD Pipe line in DevOps.

Azure Repo and Pipelines are the main DevOps components which should be used in CI / CD Pipeline.

image.png

In this case I have used a default .net core web application and Git Repository. I pushed local web application to Azure Repo as below.

image.png

If you click "Clone" button, image.png

What is CI / CD Pipe line ?

CI/CD pipelines are a practice focused on improving software delivery throughout the software development life cycle via automation. By automating CI/CD throughout development, testing, production, and monitoring phases of the software development lifecycle, organizations are able to develop higher quality code, faster. Although it’s possible to manually execute each of the steps of a CI/CD pipeline, the true value of CI/CD pipelines is realized through automation.

Create a CI Pipeline

image.png image.png image.png

Following YAML file is the basic configuration file. You can configure triggering Build branch, pool and other tasks from YAML file. Task can be dragged and dropped as below.

image.png

All the security features can be manage from the below section.

image.png

image.png

Setting Area

image.png

If you configure correctly, it will build automatically in the server. e.g. When you commit the code and Push in to the server , it would be automatically built with the specific steps given in the "YAML" file.

After Commit and Push

image.png

image.png

image.png

image.png

Next step is to Configure a CD Pipe Line

You need to click the "Releases" area as below.

image.png

image.png

image.png

image.png

image.png

image.png

image.png

Note : We can manage both CI / CD pipeline from the YAML file(Using 2 Stages). No need to use separate Release Pipeline. That is the best approach because you can version the yaml file. I will explain it from the next article.

References

(https://www.synopsys.com/glossary/what-is-cicd.html)

https://docs.microsoft.com/en-us/azure/architecture/example-scenario/apps/devops-dotnet-webapp

https://www.redhat.com/en/topics/devops/what-cicd-pipeline

0
Subscribe to my newsletter

Read articles from Lahiru Tharanga directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Lahiru Tharanga
Lahiru Tharanga