Creating a build process template which does nothing but copy all files to another directory

大城市里の小女人 提交于 2019-12-02 03:48:01

Using this post as a guide on how to start editing TFS Build Templates (or the Wrox TFS 2012 book), you need to make the following changes:

  • Locate the Copy to Drop Folder Activity:

  • Drag in a "CopyDirectory" activity under the "Drop Files to Drop Location" (from the Toolbox under Team Foundation Build Activities):

  • Goto the Properties Window for the new Activity and set Source and Destination as follows:
    • Destination: Path.Combine(BuildDetail.DropLocation, "MyOutputFolder")
    • Source: Path.Combine(SourcesDirectory, "MyFileFolder")

You may need to repeat this if you don't have all your files in one folder.

I actually put something together for TFS2010 and 2013 (not 2012, unfortunately) a few weeks ago that does exactly that. Basically, anything in the workspace you define for your build just gets shoved over to the drop location.

Here's a link to the blog post where you can download them:

http://www.incyclesoftware.com/2014/06/deploying-uncompiled-resources-release-management/

For the record, I strongly recommend against using a build process template to deploy software. Don't try to overextend the build... its job is taking stuff from source control and compiling/packaging it for deployment. Use a real release management solution to actually handle deploying software.

Add a bat file to your source folder. within the batch file add an xcopy %1*.* TargetLocation. Add an invoke process activity to your workflow, somewhere near the end. call the bat file and pass it the SourcesDirectory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!