The Azure DevOps Project simplifies the initial configuration of a continuous integration (CI) and continuous delivery (CD) pipeline for your .NET core or ASP.NET applications
What’s covered here
-
Create ASP .NET Core Web Application
-
Add xUnit Test Project(.NET Core)
-
Add Azure Web App
-
Create new Azure DevOps project
-
Configure Azure DevOps Project CI/CD pipelines
-
Commit the code changes and execute CI/CD
-
Test Web Api
Add ASP .NET Core Web Application(netcore-api). Added VersionController to the project that return application name, version, hosting, process name and app settings used in the application.
Next, Add a xUnit Test Project to solution and add couple of test to it. This will be integrated with CI/CD. If you look and the project templates you can see other test templates like MSTest and NUnit. xUnit is pretty lean compared to NUnit and MsTest and has been written more recently. The .NET framework has evolved since NUnitwas first created.XUnit leverage some of the new features to help developers write cleaner test, as tests should be kept clean and treated as first-class citizens.follow this link for more info.
Next, Login to Azure portal -> App Service -> Web Application. And Create a Web App where the above .NET Core application will be deployed. Select .NET Core 2.2 as runtime stack.
Create Azure devOps project in your Organization. Reference link https://dev.azure.com/ManavSoft/
Repository
Agent job
Add Restore task
Add Build task
Add Test task
Add Publish task
Publish Artifact
Deploy Azure App