In this post, I will talk about the method to implement CI for ASP.NET core using Classic Editor. First step is to go to your project in which you want to implement CI, go to Pipelines and click on Create Pipeline.
You will see the following screen once you click on Create Pipeline. For now we will use Classic Editor. I will talk about Yaml in different post. So, lets go with Classic Editor.
Select the source of your repo. I have my repos on Azure. If your code is in different source other than Azure, you need to create connection. Click here for more info.
Select your project, your repository and the branch in which you want to implement CICD. For this demo, I am using UAT branch.
Once you click on continue, you will see a page to select template. Click on search and type asp.net core. Select ASP.NET Core template.
Click on Pipeline and Give friendly name. You can host your own Agent pool in your own server but in this demo we will be using Azure Pipelines. I will use windows-2019 as Agent.
Click on Get Sources and verify if we have selected correct repository and branch or not. We can leave other settings as default if we have only one Agent job.
Note: Azure pipelines use .NET5 as default SDK. So if your project is in below .NET5. You need to add extra step.
You can skip this step if your project is in .NET5
Click on “+” icon and search for “use .net core”.
Click on Use.Net Core and type your project’s version. You can use the following format to specify version.
2.x => Install latest in major version.
2.2.x => Install latest in major and minor version
2.2.104 => Install exact version
Since, my project is in .net core 3.1. I will type 3.1.x
Move the previous step to top.
We have completed CI process. Now click on save and queue to verify our CI process.
You will see Agent job with status running. You can also see the console output if you click on the agent job.
And you are done with your CI thing. In Next post we will be discussing about Azure CD process.