I currently run a self-hosted TeamCity install (v10.0.5 build 42677) which starts to get rather old. I really do like TeamCity and my plan is to switch to using the latest version of it hosted in Docker and then have a build agent running elsewhere. But before taking that path, I thought I would take a quick look at Azure DevOps Services (ADS). To start simple, I took one of my very simple open-source projects (Ensure.That) which uses CakeBuild and configured (ADS) to run that Cake script. During my test, I also moved the repository from GitHub to (ADS).
The Cake script is rather simple (full source here). Looking at it from a high level, the tasks involved are:
Task("Default") .IsDependentOn("InitOutDir") .IsDependentOn("Restore") .IsDependentOn("Build") .IsDependentOn("UnitTests"); Task("CI") .IsDependentOn("Default") .IsDependentOn("Pack");
Each task is pretty much as if you would run this in the console:
dotnet build --no-restore --configuration Release
dotnet test --no-restore --no-build --configuration Release
dotnet pack --no-restore --no-build --configuration Release
Using Cake v0.32.1, in my self-hosted Team City install using the option: "clean all files in the checkout directory before the build", I get the following execution timings:
If I run the same script in Azure DevOps I get the following:
If I instead configure specific tasks in Azure DevOps:
Where I have e.g. passed switches to say
--no-restore etc. to
--no-restore --no-build to
test, I get the following result:
I can probably earn a few more seconds by combining two tasks. E.g. having build restoring the packages as well. But comparing 3min to 16s on such a simple project? I'm also a believer in build scripts, hence I will continue to use CakeBuild. And my need from a build server is currently very basic. Given this, I'm willing to maintain the build server my self. But I might use other parts of Azure DevOps. E.g. hosting artifacts and doing releases when it comes to services in Azure.