DevOps for your Organization – Part 4: Creating a Build

In the previous post, we created the demo application that we will be working with throughout this series and committed the code to our git repository.

In this post, I will be going through the steps for creating a simple build process in Azure DevOps that can build our code on demand.

Build Process as a Quality Gate

The benefits of having a build process is that Azure DevOps administrators can require builds to succeed before developers can check in their code. This, at a minimum, protects to the master branch. It guarantees that the master branch is at least always in a buildable state.

Administrators can further protect integrity of the master branch by requiring the build to run exhaustive set of automated unit tests against the newly created code. When those tests fail, the build fails, meaning that the code check-in fails.

When the developers check in their code, it must not only build, but also pass all tests. These quality gates give developers quick feedback about their code changes and helps them to detect issues earlier in the development process.

Your First Build

In order to set up the build for your demo application, navigate to your Azure DevOps instance and the project underneath it. Hover over the rocket on the right-hand side and click Builds.

You should be greeted with the following page. Click on the New Pipeline.

As you can see from the next screen, Azure DevOps actually supports a wide variety of code sources. This means that you can already begin to integrate it into your process, even if you’ve not moved your code over to Azure Repos yet.

In this page, make sure that you are pointing to the project and repository we created in the previous posts. Choose the master branch and click Continue.

Since our project is an ASP.NET Core project, we are going to choose the ASP.NET Core template and click Apply.

That will create the process as pictured below. Click on Save & queue.

Add a comment in the Save comment block and click Save & queue.

Doing this will give you a clickable link at the top of the page. Click that to track the progress of your build.

And that’s it! You now have a build process that you can manually invoke against your code base. In the next post, we will cover how to use your newly created build process to protect your branches from bad check-ins.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.