Developers these days face a lot of challenges. Building great software has always been a difficult task, requiring knowledge of coding, standards, and algorithms. And today there are many additional worries a developer might have. The code almost never stands on its own. It is built on other packages. Developers work in teams, often located at different locations. The code needs to run on a variety of platforms. There usually is 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.
Introducing 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, such as Azure Repos Git, Bitbucket, and 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.
The templates are available in easy-to-read YAML files, so you can adapt the pipeline as much as you want. 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 clicking on Start Azure Pipelines for free with GitHub at https://azure.microsoft.com/en-gb/services/devops/pipelines/.