Search code examples
tfscontinuous-integrationagilealm

Purging historical builds from the Global List


What is the best practice to purge unused or old builds from the Global List?

Currently each CI build appends its label to the Builds list. Over time the list gets bloated and occasionally we manually remove the the unused ones from the list.


Solution

  • The TFS global list does get bloated and it does hamper performance. We have the same problem ourselves.

    I suggest doing the following:

    1. Changing the work item type definitions to include a Allow Existing Values rule for the WIT fields that rely on the global list for a list of builds (e.g. the "Found in Build" field in Bugs).
    2. Periodically (manually or scheduled) remove old builds. You may look at each build definition's retention policy. It will be safe to remove the builds that are not to be retained (last 10 per definition, by default). I do suggest automating this and querying the TFS database to be sure which builds are safe to remove.
    3. Alternatively, you may look at the build's drop location and parse the directory results (i.e. keep a build that is stored there).