Building great software has always been a difficult task, requiring knowledge of coding, standards, and algorithms. Today, there are many additional worries a developer might have. The code almost never stands on its own, it’s built on other packages. Developers work in teams, often in different locations. The code needs to run on a variety of platforms, and there’s usually a long list of dependencies on helper tools, SDKs, and other artefacts.
All this results in a very difficult road to deployment. It’s not uncommon for developers to spend more time on these issues than on writing the code. In addition, the repetitive nature of this work often leads to errors: it’s easy to make a small mistake that has a huge impact down the line. For instance, not keeping the underlying framework up to date might cause the software to fail on a system that runs a higher version of that framework.
Most developers are familiar with this effect, which is often referred to as the “works on my machine” state of software. Although that is meant as a joke, it does have some truth in it. Since developers build, test, and deploy on their own local development machine, chances are that even though it works on their computer, it will work differently or even not at all on the final machine it’s meant to run on.
But there’s more. Organisations need to adapt to changing environments if they want to stay ahead of the competition. This usually means that software needs to change quickly too—providing more and better features and fewer bugs. It also has to run on a lot of different platforms, and it needs to be built by teams all over the globe.
All this adds to the workload of the developer in a very unproductive way. Developers should be building new features, solving bugs, and generally be busy adding value. Having to deal with the extra workload leads to distractions and potential problems.
Getting Started with Azure Pipelines
Azure Pipelines is a great way to mitigate those issues. With Azure Pipelines, we can move away from all those manual steps and have them done automatically whenever we need them.
An Azure DevOps service, Azure Pipelines is a system where you define the steps needed to build, test, and deploy your software once and then have the system take care of whatever else is necessary. It’s extremely simple to get started, but don’t let that fool you—it can be very powerful!
When you go to the Azure DevOps environment, you’ll find the option Pipelines, which is your starting point. There is a handy wizard to help you. For instance, you need to specify where your source code is located. There are several options available, including GitHub.
Once you’ve done that, you get a set of templates you can choose from, depending on what kind of software you are building. There are templates for ASP.NET, ASP.NET Core, .NET desktop, and Xamarin (both Android and IOS), among others. But these are just starting points. You can extend this pipeline as much as you want.
You can configure it to take all the dependencies from a NuGet repository, be it your own or a shared one. You can specify not only which tests to run and what to do if those tests fail, but also deployment slots for web apps, Azure Functions, SQL Databases, and so on. If you want to deploy to a staging environment and only swap staging with production when certain preconditions are met, you can specify that too.
You can adapt the pipeline as much as you want, and of course, these pipelines can be put under source control and distributed to others in your organisation.
Save time for more creative work
By using Azure Pipelines, you can automate many of the steps you used to have to do manually. Deployment is now a matter of starting the pipeline or, if you have continuous integration enabled, just checking in your changed code files. The pipeline engine will do the rest.
This results in better, more predictable builds and will leave you as a developer with more time to do what you do best: build awesome code.
You can get started by visiting the Azure Pipelines website.