Search code examples
tfsazure-devopstfsbuildtfs-2015

How to programmatically set the "Retain Indefinitely" field when a build successfully completes?


I'm looking for a way to set the retain indefinitely field of a build when it completes.

Maybe using a PowerShell script as a build step?


Solution

  • Check out the "Build Updating Tasks" extension. It contains a Build Retention task. It does exactly what you need. You do need to be on Update 3 of TFS if I'm not mistaking.