AppVeyor - A good continuous integration system is a joy to behold
Episode 4 (that's from 2006, people, over 8 years ago!) of the Hanselminutes Podcast was on (CI) Continuous Integration. I was deep into CI at a large bank and having a blast. It's just such a joy to have a reliable and repeatable build. Even more so if setting up that build is easy. A good CI build that includes build, test, and deploy means you don't have to fear your code.
Back in the day we used Batch Files, dreams, and wishes to setup our CI systems. Later we moved to CruiseControl.NET. Today we've got lots of amazing options, some we can download and setup inside the company, and some hosted that require virtually no effort at all!
Like many of you, I've got a number of utilities and open source projects up on GitHub. Mine are at http://github.com/shanselman, of course.
However, some are older, some aren't often built, and honestly I couldn't tell you if they build anymore. Sometimes I'll even accept a Pull Request (PR) without really confirming that there isn't a missing semicolon or a syntax error. Ya, I said it. I haven't been nailed yet, but we all do it, and we know it's bad. A reliable CI system that kicks off a build on a commit is the only way to be sure.
I decided to revisit AppVeyor as an option for my CI system. I looked at it 18 months ago and it was time to check it out again.
Just to be clear, they don't know I'm writing this, I don't know AppVeyor, and I don't do paid reviews. This is all my opinion.
AppVeyor says they "automate building, testing and deployment of .NET applications helping your team to focus on delivering great apps."
Cool. I like automation, I like building, testing and deploying. I'm lazy, as are all good developers, so automated all the things!
Their pricing is impressive. It's free for unlimited public repositories, which means I can setup a CI build for all my little utilities and open source projects on GitHub. However, their Pro and Premium options are extremely competitive when compared against running my own VM and CI system in Azure for a month.
Setting Up
I don't want to gush, but it's simple and gorgeous. I signed up with my GitHub creds (and also added BitBucket as I have some stuff there as well) and made a new project. They automatically sucked in my repositories, as well as the ones I have access to from other organizations. I selected a small one, my WiFi Manager for Windows 8, and clicked New Build.
It cloned my project and started building within a minute. I got an immediate failure, which surprised me.
I stared at the error for a moment. Ah, my folder has more than one project or solution. Odd, there's just one project. Ah! But there's a foo.csproj AND a foo.sln.
Intuitively I go to Settings | Build, and enter the name of my csproj file. By the time I come back to the dashboard it's building again.
The build dashboard is at the same time impressive and comforting. It looks like a command prompt in HTML and it updates on its own, so you never feel like you're waiting or wondering what's happening.
Amazing, look at that. It worked. I can add tests, and identify artifacts (results of the build) and act on them.
Here's my xUnit tests running automatically and their results showing up in the dashboard. Magic.
Here's AppVeyor uploading a build artifact.
Here I've added an artifact and can download it and run it right from the browser. If your artifacts are NuGet packages, they'll even give you a private NuGet feed for those artifacts that you can use in other projects or automate yourself!
Finally you can automate deployment to whatever environment you like. Push to Blob Storage (like I do for myEcho), push to a NuGet server, or Web Deploy.
Impressively, AppVeyor restores NuGet packages as well. It even built a two year old ASP.NET MVC repository of mine on the first try.
So my open source project builds, now what? Now I add a status badge to my project's ReadMe.md to let everyone who visits my GitHub repository that this is a healthy project that is building successfully!
It literally took me longer to write this blog post than it did for me to setup Continuous Integration for FOUR open source projects in AppVeyor. Literally about 15 minutes from start to finish.
AppVeyor is really impressive, fun to use, and "just works." It's a great example of Software as a Service and the kinds of software I talked about in my recent post We are abstracting on the shoulders of giants.
With cloud apps like AppVeyor for build/test/deploy, services like like RayGun.io for error management, Trello for products backlogs, FreshDesk for support tickets, there's just so many great choices for a software companies large and small. It's a great time to be writing software.
Related Links
- Setting up a Build and CI with Visual Studio Online
- Video: Continuous Delivery and Continuous Integration with Visual Studio Online and Microsoft Azure
- Jenkins - An extendable open source continuous integration server
- TeamCity - Continuous Integration for Everybody
- NuGet for the Enterprise: NuGet in a Continuous Integration Automated Build System
Sponsor: Big thanks to Mindscape for joining us and sponsoring the blog feed this week! I discovered Raygun.io and started using it for my side project and I LOVE it. Get notified of your software’s bugs as they happen! Raygun.io has error tracking solutions for every major programming language and platform - Start a free trial in under a minute!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Your post comes at a time when I'm looking for exactly such a tool. Thanks for it!
@Sean Teamcity isn't hosted, so you'll have to find your own host, and host the build agents. Plus if you want more than 3 agents it costs money. Appveyor is free for open source projects. Also if your project isn't doing anything too weird most of the time you can just point AppVeyor to your repo and it'll figure out how to build it and run tests. No configuration needed. Saves so much time not having to configure everything.
I'd argue that the best part is the deployment. You can configure several target environments and push pre-built assemblies with ease to any of those environments, as well as configure automated deployments. We are still working out the full automation story, but I'm happy to say that AppVeyor has made this really easy to do and experiment with different configurations.
A cloud CI server is looking better and better to me.
AppVeyor looks like it is on par with Travis with the yml configuration and github integration, though it looks like it lacks mono builds on linux, similar to how Travis lacks builds on windows.
AppVeyor is looking into the PCL issue that Tim mentioned:
http://help.appveyor.com/discussions/problems/354-pcl-shared-projects-and-winrt-client-apps
The NuGet deployments really do rock, for the open source project I work on, it really makes things easy for free.
I'm able to have Microsoft CLR built assemblies tested with unit tests with AppVeyor and Mono build assemblies tested with unit tests with Travis-CI. All of it publicly visible to everyone!
The most impressive thing about AppVeyor for me - above and beyond that it is REALLY free for open source projects, "just works" and is as solid as a rock - is the support. Even for free projects the support is exceptional.
If only there is something close to it for Java.
I really like that you have full control of the build agent, and that it is created and destroyed after each build. It eliminates the risk of your build agents drifting from the state they should be in, or containing dependencies that you can forget to install.
The full control means I can both install and run arbitrary tools as part of my build. I'm building a database and it means I can use the Red Gate SQL CI tools to create the database from scratch and load test data from the project.
I've recently started an open source project and was hoping something like this existed. Running CI builds is a no brainer so having this for free while I'm starting out is awesome!
Plus they've done an amazing job! Super simple to set up and get builds running.
How does this compared to using VS Online for CI pricewise? and apart from the fact that it's free for public repositories, are there other reasons for not using VS Online for CI?
If you have worked with Travis CI (for any non-Windows projects), then the appveyor.yml configuration file is very similar in its options to the .travis.yml YAML file.
Got one question about AppVeyor, how about the sensitive information in AppVeyor like build information, while i'm using TeamCity as CI tools, i can config database to store my build data, in my opinion , it's more reliable and more maintainable, what do you think?
We recently went looking for continuous deployment tooling for our clients and were pretty surprised by the number of vendors doing this in the .Net space.
- AppVeyor.com
- OnCheckin.com
- Azure Git Deployments
- Octopus Deploy
the amount of choices finally look to be catching up with the open source world (CircleCI etc). We ended up with a local Bamboo instance, but Continuous integration rocks - and choice is even better.
The slide deck and embedded video are available here: http://www.davidwhitney.co.uk/Blog/2014/05/13/continuously-deploying-azure-services-using-appveyor-and-github/
Comments are closed.