1

I have followed the guide here and I am using the Azure Cosmos DB Emulator task group in an Azure DevOps pipeline to successfully run my integration tests.

See here for how my pipeline is setup

The problem comes when on each run it takes approximately 20 mins to download the emulator. This means with multiple pushes to a branch plus a merge build it can take up a lot of time/resource.

Does anybody know if/how it would be possible to speed this up? I suppose what I actually want to do is cache the emulator image that the task group is downloading each time. However it always seems to pull latest.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Mjsc3099
  • 11
  • 1
  • Are you on a Microsoft hosted agent or on a self-hosted agent? I'm guessing the former. Caching a big docker image is ideally something you do on a self-hosted agent that can store the image on disk locally. Since the hosted agent always starts with a clean slate, no matter what you do, you'll end up having to download the emulator from somewhere. – jessehouwing Feb 09 '22 at 15:46
  • I've been seeing this same problem on Microsoft hosted agents from time to time for a few years now, so I think there would be value in answers that address that scenario. – Badger Feb 18 '22 at 17:19

1 Answers1

0

The latest provided windows-images should come with the CosmosDB emulator pre-installed on the device. See the docs on pre-installed software for a list of what's available.