Hosted MacOS build agents in Azure DevOps

21 Dec 2020

Just because…

Do you ever find yourself wasting a bunch of time trying to solve a problem, and then five minutes later discover you’d actually already solved that problem in the past - but hadn’t documented the fix. No me neither… anyway…

Azure DevOps

Microsoft have hosted agents including macOS - which is very exciting! But the documentation about how you define which specific build agent to use is hard to follow. I can see you can specify it in the GUI -

GUI Settings

but finding instructions on how to do so via your pipeline yaml was harder to find.

And then I found some!

Here they are! And actually it’s really simple. To use a Microsoft Hosted agent the syntax is

pool:
  vmImage: 'name of image'


And that’s it. So the current valid macOS images are macOS-10.14 for Mojave, or macOS-10.15 / macOS-latest for Catalina.

So here’s hoping this post will help future me, when I get stuck on this again…

Published on 21 Dec 2020 Find me on Twitter and Mastodon.