Challenge 04 - Azure Pipelines: Continuous Integration
< Previous Challenge - Home - Next Challenge >
Introduction
Great! Now that we have some infrastructure and some code, let’s build it. In DevOps we automate this process using something called Continuous Integration. Take a moment to review the article below to gain a better understanding of what CI is.
- What is Continuous Integration?
Description
In Azure DevOps we use Azure Pipelines to automate our build process. For our application the build process will not only compile our .NET Core application, it should test it, and package it into a Docker Container and publish the container to Azure Container Registry.
- Create another build pipeline like you did in Challenge 3 and name it
CI Build
- Enable continuous integration on your build pipeline (hint)
- Leverage the pipeline assistant and add 3 .NET Core tasks to restore, build, and test the application.
- There are the 4 major steps to building a .NET Core application, however we will only be using 3 since we will be containerizing the application. (Hint).
- First we call the
restore
command, this will get all the dependencies that our .NET core application needs to compile
- Next we call the
build
command, this will actually compile our code
- Next we call the
test
command, this will execute all our unit tests
Success Criteria
- Your build should complete without any errors.
- Review the test results generated by your build.
HINT: Look in the logs from your build to find where the test run was published.
- Verify that any changes to your application should trigger a build.