Move the drop and change links to this folder of historic builds
I'm changing my build environment, and part of it is that the TFS build machine has a new name. (We are decommissioning an old build agent and setting up a new one.)
The problem that I'm facing is that I have several builds from several different projects I need to retain. The files & folders need to be moved to a different server and a different network share. (E.g. I have a build done on date X that has it's drop folder on \\oldserver\oldshare and the files will be moved to \\newserver\newshare.)
Is there way to change the build history so these will point to the new location where those builds will be saved?
Update: I've seen that in the tblBuild table of the Team System Build database, these folders are kept. (In the columns DropLocationRoot, LogLocation and DropLocation.) So it is possible to change these values, but I wonder if this is the proper way to do this... or if there's a better way to make this change?
Any help would be apreciated.
Answers
- Hi Jeroen,
For new build, you can change its drop location in the settings of build agent. However, for old build, there is no typical method to change it.
I don't suggest you to change it in database because TFS database has many dependencies and relationships. Any manual change may mess them up and lead to corruption.
One possible way is to use TFS API to update the build details. Here are some information about it:
IBuildDetail.DropLocation and IBuildDetail.LogLocation are get-set properties. Use IBuildDetail.Save method to save all changes to a build.
Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer byJeroen Landheer Thursday, September 17, 2009 7:44 PM
All Replies
- Hi Jeroen,
For new build, you can change its drop location in the settings of build agent. However, for old build, there is no typical method to change it.
I don't suggest you to change it in database because TFS database has many dependencies and relationships. Any manual change may mess them up and lead to corruption.
One possible way is to use TFS API to update the build details. Here are some information about it:
IBuildDetail.DropLocation and IBuildDetail.LogLocation are get-set properties. Use IBuildDetail.Save method to save all changes to a build.
Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer byJeroen Landheer Thursday, September 17, 2009 7:44 PM
Hi Hongye,
Thanks for this suggestion. I'll give it a go and post the results. :)
UPDATE: Tried it and it worked. Thanks again!
I've posted the source code on my blog to anyone who's interested. See http://www.jeroenlandheer.com/Blog/2009/09/17/MovingTFSHistoricBuildsToANewLocation.aspx- Great to know the issue is resolved, and thanks for sharing your source code with community.
Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.