Creating CICD Pipeline on Azure
Create a Web Application in visual Studio. Here we have taken an example of ASP.NET Core Web App.
Enter the name of the project for Ex: FirstCICDPipeLineProject and then Next.
Select the Framework (In this example we have taken .NET Core 3.1)
We will see the below screen.
Now will add this project to Azure Repos. As per below screen shot Go to Git->Create Git Repository ?
Create Project with the name FirstCICDPipeLineProject
Go to Existing project path on local system and add the Azure Repository path and click on Create and Push. It will send the whole files in the Azure Repository.
We will see these files are available in Azure Repository as below.
Now we need to create Build Pipeline as per below steps. Go to Pipelines=>Pipelines =>Create Pipeline
We will get the below screen, will use the Use the Classical Editor here.
We will get the below screen where we have other options as well to choose repository, will select here Azure Repos as our code is available in Azure Repository. Then we can select the branched if we have multiple branches then we need to specific branch and then continue.
Then we have option to select template we have other options, however here created web application is in ASP.net Core, so will select the template accordingly, and then apply.
Below screen will be populated.
Here we need to do the selection of agent pipelines (Azure Pipeline or Self hosted Pipeline (If we have configured)) and select the Agent Specification (OS)
And then Get Resources, Azure Repos Git and keep the other setting by default.
?And then Save and Queue or Save.
We will do here Save and Queue, this mean pipeline will be created and ready to run, and press Save and Run button.
领英推荐
?Next screen will be the below.
We can see the logs, just click on the agent and you will be redirected the below screen. And 1 Artifact Produced as per line number 9.
Now Build Pipeline is created applications and it’s run successfully, and we have one artifact generated.
Now we need to deploy these builds on Azure Server with the help of Release Pipeline.
Go to Release section and create new Pipeline
Here we will get the below screen Artifact and Stage. In artifact section we will choose our artifact details.
As per the below screen shot and add them.
?We have trigger option where we can specify Continuous deployment trigger, this means if new build will be triggered, system will automatically perform the deployment.
And then select the stage and select the available template according to requirements in this example we will select Azure App Service Deployment.
Here we can create multiple stages based on the requirements, like PP, PROD etc.
We need to Authenticate our subscription for Azure services to be populated.
Post that App Service name will be populated which we have created on Azure.App (Services we have already created at portal.azure.com)
Click Save and Ok.
?Then Create Release
Below screen will be populated, click on the release.
?We can see the Release stages are running, and in log section we can see processed steps.
Deputy General Manager-Mobility, IoT, IT services at Tata Communications
2 年Excellent Vikas! May be publish this as a blog on medium.com
DevOps Engineer| Azure/AWS Cloud | Terraform | Kubernetes | Cloud migration
2 年Very informative and easy to follow steps!Thanks Vikash Gautam