In the Automating agent pool maintenance recipe, we learned how to configure maintenance schedules on the agent machines. While that helps free up space on the agent machine, there is maintenance activity required on the Azure DevOps Server to free up space by removing unwanted builds and releases. An average build artifact, test results, and associated metadata is in the range of 50 MB.
If the build is run 20 times a day for 30 days, this will generate about 29 GB worth of assets! While Azure DevOps Server does a great job in compressing and storing this data in blob storage, it is best to offload what you don't need. In this recipe, we'll learn how to configure a retention policy for both builds and releases at the collection level to automatically remove builds and releases that match this criteria. We'll...