Product and service reviews are conducted independently by our editorial team, but we sometimes make money when you click on links. Learn more.

An Introduction to AppVeyor the Windows Cloud Build System

By - Source: Toms IT Pro

If you're moving to an infrastructure-as-code model, you need to learn about AppVeyor.

Coding is usually a foreign concept to us IT pros. We're sysadmins, network administrators, et al., we're not coders, right? Well, that seems to be changing at least for a lot of the forward-thinking IT pros.

To keep up with the speed of business, we need to think of better ways to provision and maintain infrastructure, and that is with code. When moving to an "infrastructure as code" model, you'll soon be needing an orchestration engine to take that code, run it and run various tests on the new infrastructure. One of the modern systems to do that for Windows is called AppVeyor.

MORE: Best Resources for Learning to Code

AppVeyor is a build system in the cloud. What is a build system? In a nutshell, it is a tool that gathers up the code that's written and "converts" that code into a form that's consumable by the end user. For Microsoft IT pros, that probably means PowerShell modules and scripts.

With a build system, we can check that code into source control and have a build system pick it up, package all the code up, transform various variables to make the code production-ready and lots of other things. A build system like AppVeyor is the middle man between you and your code's users. What you have that middle man do is up to you.

AppVeyor has a concept called projects. Projects are typically mapped to applications or perhaps a single PowerShell module. You can see below I have a few projects created that are simply PowerShell modules each in their own Github repository.

Any self-respecting coder has code checked into source control, and AppVeyor knows this. If using such services as Github, Visual Studio Team Services, Bitbucket and more, AppVeyor can integrate with these source control products. By integrating directly with source control, AppVeyor can then know exactly, in real-time, whenever code is checked into the repository. By having this awareness, AppVeyor can then kick off a build which can be just anything you'd like. AppVeyor allows you to define environments that are linked to your projects which are targets for where your code should be run. For example, you can create a NuGet package and send it somewhere, upload files via FTP or even push some data to a SQL database.

There are lots of buttons to push and knobs to turn in AppVeyor, but the most common way to configure AppVeyor per-project is to use the appveyor.yml file in the root of your project. This file contains just about every option you can think of to configure your project build's behavior. This is where you define all of the actions that AppVeyor takes when it receives notification that new code has been checked into your repository.

Each project has its own appveyor.yml file and environments. By having independent settings and environments, we can configure each project uniquely and provide different settings like pushing at various environments, running different PowerShell scripts and so on.

Learning AppVeyor, like other build systems, can seem daunting at first. For IT pros, the concept of a "build" may seem foreign. But once you're able to understand what a build is and especially how this build fits into a build pipeline, you'll soon begin to understand a lot of the concepts around DevOps and will greatly help in transforming you from a scripter to a coder.