ASP.NET 应用程序 - 提取、测试、编译和部署
假设:我对持续集成领域非常陌生。
我应该使用什么方法来提取、测试、编译、部署 ASP.NET (.NET 3.5) 应用程序。
步骤1) 有时我想从 TFS 中获取最新的源代码,有时还想从 Subversion 中获取。
第2步) 运行所有测试。 (我目前使用的是MbUnit)
步骤3) 如果所有测试都通过,则构建发布版本。
步骤4) 通过 FTP 部署代码 - 替换特定 URL 处的当前应用程序
我正在寻找易于学习和使用的解决方案 设置成本低或免费/开源。
MSBuild 是否是第 3 步中最简单的事情? 因为我真的不想做任何特别的事情......只需提供一个解决方案名称并编译它。 我主要关心的是找到一些东西来抽象出由需求/步骤 #1 引起的任何主要问题。
Assumption: I'm very new to the Continuous Integration space.
What is the method I should use for Extracting, Testing, Compiling, Deploying an ASP.NET (.NET 3.5) application.
Step 1)
Sometimes I would like to pull the latest source from TFS, and sometimes Subversion.
Step 2)
Run all tests. (I am currently using MbUnit)
Step 3)
If all tests pass build a release version.
Step 4)
Deploy the code via FTP - replacing the current app at a specific URL
I'm looking for solutions that easy to learn & setup, and low cost or free / open source.
Would MSBuild be the easiest thing to do for step #3. Since I don't really want to do anything special ... just provide a solution name and compile it. My main concern is finding something abstracts away any major issues caused by requirement/step #1.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们使用 CruiseControl.net,但是您的第一个要求可能有点问题。 您能否解释一下如何选择从哪个存储库中提取源代码。 CC.NET 可以使用其中任何一个,或者如果您对 ccnet.config 设置有一点了解,也可以同时使用两者,但更重要的是您如何知道要从哪一个中获取。
其余的很简单,我使用 NAnt 来完成实际工作,并且很容易做到这一点。
编辑:
NAnt已经有一段时间没有更新了,当MSBuild发布时开发就停止了。 如果你在 stackoverflow 上搜索,你会发现很多“我应该换成 MSBuild”类型的问题,就我个人而言,我们对 NAnt 有相当多的了解,它做了我们想要的事情,而且我们做的一些事情出现了在 MSBuild 中非常困难,所以我们会再坚持一段时间。
CruiseControl.NET 有可以直接调用 MSBuild 的任务,但我们仍然直接调用 DevEnv,因为我们构建了很多部署项目,这是 MSBuild 难以做到的。
我们的 NAnt 脚本带领我们从 ClearCase 中提取正确的源代码,一直到打包产品准备好发货。
然而,NAnt 只是一个选择,如果您对另一种脚本语言(例如 PowerShell)感到满意,那么没有理由不使用它。 CruiseControl.NET 可以使用标签将任何可执行文件作为任务调用,并通过使用环境变量传递大量信息。 此页面: http://confluence.public.thoughtworks.org/display/CCNET /Executable+Task 详细说明了传递的内容。
就使用相同步骤而言,两个设置之间的唯一区别是 ccnet.config 文件中的源代码控制块,当我们更改所使用的视图时,我们的 NAnt 脚本根本不会更改,因为一切都是相对的,并且我们发生了这种情况为我们的视图提供标准布局,这意味着我们始终知道所有内容的位置。
希望能多一点帮助。
艾伦.
We use CruiseControl.net, however your first requirement could be a bit of an issue. Could you explain how you make the choice as to which repository you pull the source from. CC.NET can work with either of those, or could work with both at the same time if you got a bit clever with the ccnet.config settings, but it's more down to how you know which one to pull from.
The rest of it is easy, I use NAnt to do the real work and its easily up to that.
edit:
NAnt hasn't been updated for some time, the development stopped when MSBuild was released. If you do a search on stackoverflow you will find quite a few "should I swap to MSBuild" type questions, personally we have a reasonable amound of knowledge in NAnt, it does what we want, and there are some things that we do that appear very hard in MSBuild so we will hang on for a while longer.
CruiseControl.NET has tasks that can call MSBuild directly, we still call DevEnv directly as we build a lot of deployment projects which is something that MSBuild has trouble doing.
Our NAnt script takes us all the way from pulling the right source out of ClearCase all the way to packaged product ready for shipping.
However, NAnt is just one option, if you are happy with another scripting language such as PowerShell then there is no reason why that shouldn't be used. CruiseControl.NET can call any executable as a task using the tags and passes a lot of information through using envirionment variables. This page: http://confluence.public.thoughtworks.org/display/CCNET/Executable+Task details what gets passed on.
In terms of using the same steps the only difference between the two setups would be the source control block in the ccnet.config file, our NAnt script doesn't change at all when we change the view being used as everything is relative and we hapen to have a standard layout for our views which means we know where everything is all of the time.
Hope that helps a bit more.
Alan.