分步 ASP.NET 自动构建/部署 [英] Step-By-Step ASP.NET Automated Build/Deploy

查看:21
本文介绍了分步 ASP.NET 自动构建/部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎有很多不同的自动化构建/部署方法,以至于很难解析人们在网络教程中支持的所有不同场景.所以我想向 stackoverflow 人群提出这个问题......使用以下配置设置自动构建和部署系统的最佳方法是什么:

Seems like there are so many different ways of automating one's build/deployment that it becomes difficult to parse through all the different scenarios that people support in tutorials on the web. So I wanted to present the question to the stackoverflow crowd ... what would be the best way to set up an automated build and deployment system using the following configuration:

  • Visual Studio 2008
  • Web 应用程序项目
  • CruiseControl.NET

我尝试的第一件事是让 CCnet 自动压缩输出并将其复制到服务器,但这需要手动工作才能在目的地解压缩.但是,如果我们尝试单独复制所有文件,那么如果它是一个大型应用程序,则可能需要很长时间(构建服务器位于我们办公室的数据中心之外......我知道).

One of the first things I tried was to have CCnet automatically zip the output and copy it to the server, but then that requires manual work to unzip at the destination. However, if we try to copy all the files individually, then it could potentially take a long time if it's a large application (build server lives outside of the datacenter in our office ... I know).

另外一个特别感兴趣的是我们将如何支持多种环境,因为我们有 dev、qa、uat,当然还有 prod.

Also of particular interest is how we would support multiple environments as we have dev, qa, uat, and then of course prod.

MSDeploy 看起来真的很有趣,但除非我对文献的解释不正确,否则在从构建服务器的输出进行部署的场景中没有帮助.如果有的话,它似乎在跨构建场部署一个构建时很有用……但即使是从一个环境部署到另一个环境,也必须手动更改配置设置和 Web 服务 URL 等.

MSDeploy seems really interesting, but unless I'm interpreting the literature incorrectly, doesn't help in the scenario of deploying from the output of a build server. If anything, it seems like it'll be useful in deploying one build across a build farm ... but even for deploying from one environment to another, one would have to manually change config settings and web service URLs, etc.

推荐答案

我最近花了几天时间在我的公司进行自动化部署.

I recently spent a few days working on automating deployments at my company.

我们使用 CruiseControl、NAnt、MSBuild 的组合来生成应用程序的发布版本.然后一个单独的脚本使用 MSDeploy 和 XCopy 来备份实时站点并传输新文件.

We use a combination of CruiseControl, NAnt, MSBuild to generate a release version of the app. Then a separate script uses MSDeploy and XCopy to backup the live site and transfer the new files over.

我们的解决方案在此问题的回答中简要描述了Web 应用程序的自动化部署?

Our solution is briefly described in an answer to this question Automate Deployment for Web Applications?

这篇关于分步 ASP.NET 自动构建/部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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