Introduction
This article series will explain using Jenkins for CI and CD of an ASP.NET Core web application on the local development environment, publishing the web application to Azure Web App Service, and configuring Jenkins on Azure for continuous integration and continuous deployment of the hosted application. GitHub will DevOps as a source control repository. We’ll create a pipeline using Jenkins that fetches the code from GitHub, builds the code, runs the tests, and deploys the package. This will be a repetitive task on each commit to the code located on GitHub.
In the first article of the series, we learned about the concepts, terminology, and technologies involved, installing Jenkins, creating ASP.NET Core application, and continuous integration of Asp.Net Core application using Jenkins via two approaches i.e. pipeline approach and freestyle project approach. In the second article, we published the ASP.Net core application to Azure App Service and Configured Jenkins on Azure.
In this article, we’ll focus on Azure Active Directory and Service Principal and integrate Jenkins with Azure Service Principal before we move on to CI/CD of ASP.NET Core application on Azure using Jenkins Azure Pipeline.
Roadmap
Following is the roadmap we would be following to completely learn end-to-end development and configurations of Continuous Integration and Deployment (CI/CD) of Asp.Net Core Application on Azure Web App using Jenkins.
- Day 1: Continuous Integration of ASP.NET Core application using Jenkins.
- Day 2: Publish the ASP.Net core application to Azure App Service and Configure Jenkins on Azure.
- Day 3: Integrate Jenkins with Azure Active Directory and Service Principal.
- Day 4: CI/CD of ASP.NET Core application on Azure using Jenkins Azure Pipeline.
Prerequisites
Go through the first two articles of the series before starting this article.
The following are the prerequisites for the developers to have on their machines before getting started.
- Visual Studio 2017/2019.
- Dotnet 2.1 SDK installed.
- Azure Subscription Free/Paid.
- Java 1.5 or higher.
- Git account
- Git for Windows
Azure active directory and service principal
The next step is to create an identity for our application as it needs access to our Azure web app. This identity will serve as a service principal that could be assigned certain permissions to operate on the app.
Create an Azure active directory and service principal
- In the Azure portal, click on “Azure Active Directory” and then on “App Registration” as shown below.

- Click on “New Registration” to create a new app registration.

- Provide a meaningful name. E.g. I provided “jenkins_sp” and selected the first option for the supported account types i.e. “Account in this organizational directory only”.

- Click on “Register” to create this new Azure AD and service principal.
- Navigate to the newly created application i.e. “Jenkins_sp”.











Join the conversation! Your thoughts help the community grow.