TFS 2010 通过文件系统构建发布
我在 TFS 中有一个相当大的 MVC2 项目,它在签入时自动构建(持续集成)
目前,完整构建的版本转储到我们的开发 IIS 服务器上的网络共享上。 \\Server\wwwrootLatest
TFS 当然会创建很多子文件夹,因为它只是进行构建,它甚至不知道它的放置目录是 wwwroot。
这意味着要实际使用该构建,我们需要手动创建一个指向适当目录的 IIS 应用程序 - 这会破坏练习的整个目标。
当我们手动发布到该服务器时,我们使用“文件系统”作为方法,只覆盖 UNC 共享 \\Server\wwwroot
中的文件
(当发布到其他环境时,我们使用完整的-on MSDeploy。)
我想做的是说服 TFS 在构建完成后进行“文件系统”发布,并复制我们在手动发布上所做的操作,例如:
放置目录为 \\Server\Build< /code> 会导致类似于
\\Server\Build\Project\Date.Rev\
完成后,我们希望将其发布到 \\Server\wwwrootLatest
> - 然后我们可以设置一次应用程序,该应用程序将始终包含最新版本,但如果需要,仍将具有完整的历史记录。
我能够找到的唯一示例在构建定义中使用 MSBuild 命令(很好),但所有示例都使用 MSDeploy 进行全面发布。我不确定如何自动化我想做的事情
任何帮助表示赞赏。
I've got a fairly large MVC2 project in TFS which gets built automatically on checkin (Continuous Integration)
At present, the fully built version is dumped on a network share on our dev IIS server. \\Server\wwwrootLatest
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.
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.
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
(When publishing to other environments, we use full-on MSDeploy.)
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:
Drop directory is \\Server\Build
which would result in something like \\Server\Build\Project\Date.Rev\
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.
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
Any help appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的放置文件夹中,会自动生成一个名为
_PublishedWebsites
的文件夹。它包含您需要放入wwwroot
中的文件。您可以使用CopyDirectory
构建活动自动复制它们。In your drop folder a folder named
_PublishedWebsites
is generated automatically. It contains files you need to put inwwwroot
. You can useCopyDirectory
build activity to copy them automatically.