1
votes

We are using Tfs2015.Update2.1 [14.95.25229.0].

We have vNext build definitions with a retention policy of 21 days. The maximum retention policy is set to 90 days. Yet we have builds that are over 100+ days old that have not been deleted (they still show up in the list of completed builds). It appears that the retention policy is not being applied at all. What can I do to verify that the retention policy cleanup process is actually running?

2
Did the problem is occuring in multiple build definitions? or Only for one build definition?PatrickLu-MSFT
The problem is occurring for multiple build definitions. In all cases, the "Delete Build Record" setting is true (all of the delete options are true). The builds are also not set as "retain indefinitely". So it seems that they should be deleted, but they are not being deleted.mweaver

2 Answers

1
votes

If you specify build retention policies, retention policies will delete the items below:

  • The build record
  • Logs
  • Published artifacts
  • Automated test results
  • Published artifacts
  • Published symbols

First please make sure you have set Delete build record = true.

enter image description here

Also note completed builds may be exempted from their associated retention policy in the view of builds by selecting Retain Indefinitely from their context menu. The Release Manager will set the builds as //kmm, please refer to the information in this User Voice.

Please view this build definition’s builds in Build Explorer window, check if some builds be set as Retain Indefinitely in there.

You can also double check the older build recoder to see whether has been deleted. The deleted build record should be the same as below picture: enter image description here

1
votes

There was an issue with the background job responsible for retention. Team Foundation 2017 Update 3.1 includes the fix.