9

我正在寻找一些建议来自动进行项目构建和部署。

我们当前的开发设置使用 ASP.NET、SVN、CCNET 和用于开发服务器构建的 MSBuild 脚本。我正在考虑切换到 Cruise 而不是 CCNET,但我不确定这是否能给我带来我还没有的额外东西。

我想要自动化的是从完成自动构建到使用新更改更新实时站点的过程。站点更新可以包括基础站点更新以及可以是代码和/或数据库更改的客户端更新,因此该过程需要足够灵活,以便它可以处理这些场景。

我的灵感来源之一来自这个视频,以及每个月花在更新上的无休止的时间。

4

3 回答 3

4

For smaller or personal projects, I would recommend using something like the free (and excellent) TeamCity by JetBrains. Unit test automation, continuous integration, and rules for what happens after a build (including moving it around to different locations).

For larger teams, I've actually found a bit of build automation in the form of custom MSBuild tasks and RoboCopy works best. This nice combination between manually promoting builds between environments and using MSBuild & RoboCopy to automate parts of this process creates clean breaks between environments (with very few 'oops I didn't mean to push that there' mistakes). It also lets us have QA review builds before promoting.

Update 7/31/2014:

I've used custom TFS build templates with success. They're a bit complicated, but you can do quite a few cool things with them.

For open source projects (like NuGet libraries) hosted on GitHub, I don't think you can beat AppVeyor. I've got a few projects like Mailchimp.NET that have complete build and NuGet deploy automation.

于 2010-03-02T17:53:46.487 回答
0

我过去曾使用过 Nant 来完成类似的任务。您可以使用您的自动构建来启动它。( http://nant.sourceforge.net/ )

如果你想要更全面的东西,你可以查看 wix ( http://wix.sourceforge.net/ )

现在您确定要更新实时站点吗?或者你的意思是你开始一个构建,使用你的 cc 工具,然后它生成一个构建来上线?

当有人签入文件的新版本时,我不想让实时站点更新。

您的数据库更新可能是最具挑战性的方面。但是,只要为数据库更新签入的是更改脚本,就不错了。

于 2010-02-19T23:24:00.160 回答
0

听起来部署代码更改的两个主要功能是:1. 复制文件和 2. 执行数据库脚本更改。如果您考虑使用MsBuild 社区任务,那么有很多方便的构建任务可以帮助您。SqlExecute 和 RoboCopy 听起来就像您需要使用的全部。这将需要您修改项目文件以扩展它们的构建行为,但是一旦完成,您就可以“编写”正在执行的手动部分。

于 2010-03-02T17:40:34.203 回答