Last week we have migrated from TFVC to Git on our ADS 2019.1 server.
On our validation pipeline we have an aggressive retention policy. It is set to Keep for 2 days, 10 good builds with the branch filter * and all checkboxes cleared ADS writes it as: +refs/heads/*
What we see is that since we migrated, none of the Git builds have been deleted. From the last 8 days we now have hundreds of builds with their multi-GB drop.
Is * the right branch filter to use ? This was the default setting entered by ADS, we do indeed want all builds for all branches to be deleted by this policy.
I also tried **, but that made no change, in the build results page i see all build are build off a temporary branch with a 4 digit number, which is probably the pull request number.
How can we ensure the builds are cleaned up as per the retention policies ?
The Build definition is not linked to a Release pipeline. The builds are triggered from the Pull Requests created by developers. The Pull requests are marked as Completed.
Another build definition, one with a CI trigger that runs after every commit, does still seem to delete builds based on the retention policy defined.
Picture of our TFS Retention policy settings. Master builds are cleaned up, pull request builds are not
List of the oldest builds in TFS after manual cleanup last week, these builds are now 4-5 days old, over the 2 day limit of the retention policy. Also you can see there is no retain lock behind them.
Overview of the deleted builds. You can see 'master' builds in there that have been deleted by the retention policy.
Shows the master builds are deleted after the 2 day retention policy setting