danielwertheim

danielwertheim


notes from a passionate developer

Developer that lives by the mantra "code is meant to be shared".

Share


Tags


Disclaimer

This is a personal blog. The opinions expressed here represent my own and not those of my employer, nor current or previous. All content is published "as is", without warranty of any kind and I don't take any responsibility and can't be liable for any claims, damages or other liabilities that might be caused by the content.

Trying out Azure DevOps as a replacement for TeamCity

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…

Daniel WertheimDaniel Wertheim

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:

  • Restore: dotnet restore
  • Build: dotnet build --no-restore --configuration Release
  • UnitTests: dotnet test --no-restore --no-build --configuration Release
  • Pack: 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:

cakebuild-teamcity-selfhosted

If I run the same script in Azure DevOps I get the following:

azure-devops-cake

If I instead configure specific tasks in Azure DevOps:

azure-devops-all-tasks

Where I have e.g. passed switches to say --no-restore etc. to build and --no-restore --no-build to test, I get the following result:

azure-devops-taskbased

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.

//Daniel

Developer that lives by the mantra "code is meant to be shared".

View Comments