0
votes

Please help me to understand new build system in TFS 2017. I configured a build to publish symbols and binaries to a network share. When the build is deleted, published data is not deleted.

  • How can I configure it?
  • How can I investigate what happened?
  • How should this work?
  • What is the best practice to delete these build artifacts?

What I have: I have an agent queue with 3 agents (under build service domain account). I have build definition with "Publish Symbols" to a network path and "Publish Artifact" task to a network path. Shared folders have "Full Access" permissions for "build service domain account" and TFS service account.

When I remove build manually or it is removed by "retention rules" the symbols and artifacts are not removed. I checked logs on TFS, but I couldn't find anything about removing artifacts. Is there something I am missing?

Thanks in advance.

2
This is a very broad question. Generally you will get a better community response if you ask a specific question and show what you've tried and where it is not doing what you want.Greg Schmit

2 Answers

1
votes

This is a known issue Drop Folder not deleted when build is deleted and got a reply Erin [MSFT] at 2016/9/15

This has been fixed on Team Services and is in Team Foundation Server '15', which is currently in prerelease.

And for Retention policies, there is also a related uservoice: Retention policies in TFS 2015 build should delete UNC drops and got a reply:

Completed Team Services Group (Product group, Microsoft Visual Studio) responded · August 23, 2016

This feature is available on VSTS and with TFS 15. See https://www.visualstudio.com/en-us/docs/build/news/2016#april-18 for more details.

Just as jessehouwing said seems the issue still exist with TFS2017 and has not been fully resolved until now, a workaround is using server drops instead. Another way is using some extension to clean the build artifactdrop location for builds that have been wiped out of TFS. Details please take a look at the answer from skundu in this question: TFS 2015 - Delete Build Artifacts

0
votes

I know for sure that this has been unavailable for network drops in TFS 2015 up to update 3. As far as I can tell this hasn't changed with 2017. When you do a server drop the artefacts do get cleaned up.

The problem with the new extensible build pipeline, is that many more tasks may be dropping "artifacts", such as nuget packages, marketplace extensions, javascript mapping files etc. TFS would not know how to clean these up, until the build engine has support for an extensible model for cleanup tasks.