通过文件系统TFS 2010生成发布 [英] TFS 2010 Build Publish via file system

查看:223
本文介绍了通过文件系统TFS 2010生成发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有TFS中一个相当大的MVC2项目,该项目被签上自动生成(持续集成)

I've got a fairly large MVC2 project in TFS which gets built automatically on checkin (Continuous Integration)

在present,完全内置的版本被倾倒在网络共享我们的开发IIS服务器上。 \\服务器\ wwwrootLatest

At present, the fully built version is dumped on a network share on our dev IIS server. \\Server\wwwrootLatest

当然,TFS创建大量的子文件夹,因为它只是在做一个构建,它甚至不知道它的投递目录是wwwroot的。

TFS of course creates lots of sub-folders since it's just doing a build, it isn't even aware that it's drop directory is a wwwroot.

这意味着,实际使用的版本,我们需要去手动创建,其指向相应的目录中的IIS应用程序 - 这违背了运动的整个对象

This means that to actually USE the build, we need to go and manually create an IIS App which points at the appropriate directory - which defeats the whole object of the exercise.

当我们做一个手动发布到服务器,我们使用文件系统的方法,只是覆盖UNC共享文件 \\服务器\ wwwroot文件

When we do a manual publish to that server, we use "File System" as the method and just overwrite the files in the UNC share \\Server\wwwroot

(当发布到其他环境中,我们使用全通MSDeploy。)

(When publishing to other environments, we use full-on MSDeploy.)

我想要做的是说服TFS做一个文件系统发布构建完成后,复制了我们做一个手动发布,例如:

What I'd like to do is convince TFS to do a "File system" publish after the build completes and duplicate what we do on a manual publish eg:

删除目录 \\服务器\构建,这将导致类似 \\服务器\生成\项目\ Date.Rev \

Drop directory is \\Server\Build which would result in something like \\Server\Build\Project\Date.Rev\

之后,我们希望它发布到 \\服务器\ wwwrootLatest - 那么我们就可以设置应用程序,一旦它总是包含了最新的版本,但会还有一个完整的历史记录,如果需要的。

After that is complete, we want it to publish to \\Server\wwwrootLatest - we can then set up the App once which will always contain the latest version but will still have a full history if required.

我已经能够找到使用的MSBuild的构建定义(精)命令,但都使用MSDeploy做一个全面上发布的唯一例子。我不知道如何自动执行我想要做的。

The only examples I've been able to find use MSBuild commands in the build definition (fine) but all use MSDeploy to do a full-on publish. I'm not sure how to automate what I want to do

任何帮助AP preciated。

Any help appreciated.

推荐答案

在Drop文件夹的文件夹命名为 _PublishedWebsites 自动生成。它包含了你需要把的wwwroot 文件。您可以使用 CopyDirectory 构建活动自动复制它们。

In your drop folder a folder named _PublishedWebsites is generated automatically. It contains files you need to put in wwwroot. You can use CopyDirectory build activity to copy them automatically.

这篇关于通过文件系统TFS 2010生成发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆