Reputation: 225
I have a build definition in TFS 2012 and its currently dropping the build onto a network share which will be used as the website root folder.
The problem is it's creating a new folder based on the version number each time. I'd like to keep the version numbering but just make it clear out and deploy to the same folder over and over so I don't have to change anything in IIS. Folders are like -
each containing a complete deployment. I just need one folder that gets everything dumped in it for every build.
Upvotes: 2
Views: 1317
Reputation: 3923
You could use the new feature in 2012 sp1 that lets you place the output within TFS source control then you would just need to run a TFS GET command manually or via an updated workflow call to update the latest files and binaries for your website location. Option number 3 in the picture below.
2012 MSDN-Select a Staging Location and Setting Up a Drop Folder
Upvotes: 1
Reputation: 13259
What you are trying to do is counterintuitive to the build system, because not only does it drop the artifacts of the build into that folder, but when the retention policy is fulfilled it will try to delete those artifacts back out. So if you do this you will need to set your retention policy to keep always so it never tries to delete out the contents of this folder. You are better off, adding after the copy to drop step a Manual copy to this static folder that won't be subject to retention policy as it will know nothing about it. But if you wish when you open the template in the main sequence you will see a sub-sequence called Update Drop Location. In there is 3 items, the middle one is an If statement for if drop build and Build Reason is triggered, dig down into the then side and you will find a sequence which contains an activity called Set Drop Location. Right click on its properties and you will see how the path string is currently put together, adjust this string to what you wish and then this value will be propagated through out the build template
Upvotes: 2