CI+CD (Continuous Integration/Continuous Delivery)

CI – Continuous Integration

The build pipeline for a .NET core application should resemble the following:

The build should be triggered to execute upon check-in (or merge) into the master branch.

Step 1: .NET Core SDK/runtime installer. Package to install is “SDK” and version is “3.1.401”.

Step 2: .NET Core Restore. Path to project(s) “*/.csproj”. Select Company.SharedFeed as Feed to use as well as enable “Use packages from NuGet.org”.

Step 3: .NET Core Build. Path to project(s) “*/.csproj”.

Step 4: NET Core Test. Path to project(s) “*/.Tests.csproj”. Enter the following arguments “–collect “Code coverage””.

Step 5: .NET Core Publish. Enable “Publish Web Projects” and enter the following arguments “–output $(build.artifactstagingdirectory)”. Enable Zip Published Projects and Add project name to publish path.

Step 6: Publish build artifacts. Path to publish “$(Build.ArtifactStagingDirectory)”. Artifact name “drop”. Artifact publish location “Azure Pipelines”.

The build pipeline should be named the same as the solution with “-CI” as the suffix.

The build pipeline should be created after the initial creation of the Azure DevOps code repository.

CD – Continuous Delivery

The release pipeline for a .NET core application should resemble the following:

Select the artifact from the associated build pipeline. Enable the continuous deployment trigger.

Create a DEV stage.

If deploying to an Azure App Service, only one step will need to be added to the stage. “Azure App Service deploy”.
Connection type “Azure Resource Manager”. Select the Azure Subscription. App Service type “Web App on Windows”. Specify the App Service name. Set the Package or Folder as “$(System.DefaultWorkingDirectory)/*/.zip”.

Duplication the DEV stage for each environment and edit the deployment step in each stage according to the associated environment.

The release pipeline should be named the same as the solution with “-CD” as the suffix.

The release pipeline should be created after the initial creation of the Azure DevOps code repository and the associated build pipeline.

PREVIOUS: Hosting and Infrastructure
Solution Architecture Guidance
NEXT: The Application Domain