This project demonstrate how Azure DevOps Pipelines can be used to;
- [CI] build a .NET solution having a very basic ASP.NET Core MVC website
- [CD] deploy the site to an
Azure App Servicewith the URL:
https://testazurepipelines.azurewebsites.net/
The .NET solution DemoWebApplication.sln consist of:
- ASP.NET Core MVC project
src/DemoWebApplication - xUnit test project
tests/DemoWebApplication.Tests
Latest CI/CD status:
For this propose, in Azure DevOps a build pipeline - build.test-azure-pipelines - is configured.
This Pipeline can be executed, to build the master, release or any other branch in this repository.
And the build will:
- build the .NET solution (projects)
- publish the web content (to a folder)
- execute the unit-tests
- calculate unit-test code coverage
- create a .nupkg having the published web content
- push the .nuget package to a NuGet feed
Based on the branch that get build, i.e.:
if {branch} = masterthen aMajor,MinororHotfixpackage will be published to Production NuGet Feedif {branch} = releasethen aRelease Candidatepackage will be published to Production NuGet Feedif {branch} = {any other}then aPreviewpackage will be published to Development NuGet Feed
| Major Release | Minor Release | Hotfix | Release Candidate | Preview |
|---|---|---|---|---|
In Azure DevOps, there are two release Pipelines created to deploy the web site to the Azure App Service:
- prd_release.test-azure-pipelines - to deploy a package from the Production NuGet Feed
- dev_release.test-azure-pipelines - to deploy a package from the Development NuGet Feed
And deploying a release in the pipeline will deploy the .nupkg assigned to that release to the Azure App Service.