C#/.NET - 持续集成和 FTP 部署
注意:我是持续集成的新手
获得这些功能的“最佳”方法是什么:
- 构建(程序集和 Web 应用程序)
- 测试(MbUnit 或 NUnit)
- 以及是否通过测试通过 FTP 部署到主服务器(互联网) 。
我所说的“最好”是指最便宜的选择,并且易于学习(低头痛)。
Note: I'm a newb to Continuous Integration
What is the "best" approach to get these functions:
- Build (assemblies and web app)
- Testing (MbUnit or NUnit)
- and if it passes tests deploy via FTP to the main server (internet).
And what I mean by "best" is cheapest option, and easy to learn (low headache).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我在这里写了一篇非常详细的博客文章,使用 TeamCity 和 Web 部署项目来自动化构建和部署(本地):
http://www.diaryofaninja.com/blog/2010/05/09/automated-site-deployments-with-teamcity- deployment-projects-amp-svn
然后我添加了此内容以显示 FTP 添加
http://www.diaryofaninja.com/blog/2010/09/21/continuous-integration-tip-1-ndash-ftp-deployment
基本上过程是这样的:
我然后确保我只部署 SVN 存储库的主干,并在合并之前开发和测试分支中的所有内容 - 这样只有经过测试的内容才会被部署。 将自动化测试添加到您的构建周期中,您就获得了天作之合。
I have written a pretty detailed blog post using TeamCity, and Web Deployment projects to automate build and deployment (local) here:
http://www.diaryofaninja.com/blog/2010/05/09/automated-site-deployments-with-teamcity-deployment-projects-amp-svn
I have then added to this to show FTP addition
http://www.diaryofaninja.com/blog/2010/09/21/continuous-integration-tip-1-ndash-ftp-deployment
Basically the process is like this:
I then make sure that i only deploy the Trunk of my SVN repo, and develop and test everything in an branch before merging - this way only tested stuff gets deployed. Add Automated testing to your build cycle and you've got a match made in heaven.
我会使用 msbuild 和 mbunit 进行单元测试。 对于 FTP 部分,谷歌搜索带有 FTP 的 msbuild 自定义任务,你应该用煤气做饭。
I would go with msbuild and mbunit for the unit tests. For the FTP part google for msbuild custom tasks with FTP and you should be cooking on gas.
我曾经使用过 CruiseControl,它的效果刚刚好很好,但我也听说过有关 TeamCity 的好消息。 关于 MSBuild 的 FTP 任务(这绝对是您想要的方式),可以在网上找到一些。 当我上次检查时(不是最近),我发现所有这些都有一个或另一个缺点,所以我最终自己编写了一个(将 FtpWebRequest 包装在 .NET 中)。 虽然这可能不是最好的 FTP 实现,但该任务提供了我需要的功能(上传目录结构、远程删除)。 我想今天可能有可用的任务提供该功能(否则也许我应该发布我的......)
I have historically used CruiseControl, which has worked just fine, but I also heard good things about TeamCity. Regarding FTP tasks for MSBuild (which is definately the way you want to go), there are some to find on the net. When I checked last time (which was not quite recently) all that I found had one or another shortcoming, so I ended up writing one myself (wrapping the FtpWebRequest in .NET). While that might not be the best FTP implementation around, the task provided the functionality I needed (upload of directory structures, remote delete). I guess there might be tasks available today providing that functionality (otherwise maybe I should just publish mine...)
我们使用 Hericus Software 的 Zed Builds and Bugs Manager 执行同样的操作。
我们必须将 .Net 程序集与 C++ dll 结合起来,并将整个组件打包到 Java 安装中(想象一下那种混乱:-))。 我们还使用 FTP 将构建的一些组件(而不是整个组件)上传到需要构建生成的部分内容的其他系统。
将所有内容整合在一起后,Zed 服务器的好处在于它成为我们的系统,每个人都知道从哪里获取他们的工件。 它处理从开发到质量检查再到生产的升级,并跟踪整个生命周期的构建。
We do the same thing with Zed Builds and Bugs Manager from Hericus Software.
We have to combine the .Net assemblies with C++ dll's and package the whole thing together into a Java installation (imagine that confusion :-) ). We also use FTP to upload some components of the build (not the whole thing) to other systems that need pieces of what the build produces.
After everything has all been rolled together, the nice thing about the Zed server is that it becomes our system where everyone knows where to get their artifacts from. It handles promotion from Dev to QA to Production, and tracks the builds through this lifecycle.