让 MSDeploy 在我们的构建/集成服务器上运行 - 是否需要 MSBuild 升级?
我们有一个我认为相当标准的构建流程: 1. 开发者:签入代码 2. 构建:轮询存储库,查看更改,然后启动构建: 3. 构建:从存储库更新、使用 MSBuild 构建、使用 nunit 运行单元测试、 4. 构建:创建安装程序包
我们的安全团队允许我们从构建服务器拉取,但不允许构建服务器推送。因此,我们通常 rdp in、d/l 安装程序并运行它们,这排除了灵活的部署服务,因此我需要生成包。我想使用 MSDeploy,但我们有以下问题:
- 我们使用的是 .net 3.5,而使用 MSDeploy 的 MSBuild 目标(包)需要 4.0。除了 .net 4.0 RC 之外,我还需要安装什么吗? (MSBuild 会成为升级的一部分吗?)
- 当我使用 MSDeploy 生成包时,我发现我不只有 1 个文件。其中有 zip、deploy.cmd、SourceManifest.xml 和 SetParameters.xml。所有其他文件的用途是什么,为什么它们不都在“包”中?
- 听起来好像您可以通过告诉系统查看正在运行的 IIS 站点来创建包。但是,如果这些包是从 CI 环境构建的,那么您是否基本上不走运?感觉他们是为从他们的开发环境中部署的小规模开发人员设计的。这是一个很好的用例,但我有兴趣了解每个人对该工具的企业体验有什么
建议吗?
We have what I think is a fairly standard build process:
1. Developer: Check in code
2. Build: Polls repo, sees change, and kicks off build that:
3. Build: Updates from repo, Builds w/ MSBuild, Runs unit tests w/ nunit,
4. Build: creates installer package
Our security team allows us to pull from the build server, but does not allow the build server to push. So we generally rdp in, d/l the installers, and run them, which rules out the slick deployment services, so I would need to generate packages instead. I'd like to use MSDeploy, except that we have the following issues:
- We're on .net 3.5, and the MSBuild target (Package) that uses MSDeploy requires 4.0. Is there anything I'd need to install other than .net 4.0 RC for this? (Would MSBuild be part of that upgrade?)
- When I generate packages with MSDeploy, I see that I don't have just 1 file. There's a zip, deploy.cmd, SourceManifest.xml, and SetParameters.xml. What are all the other files for, and why wouldn't they all be in the 'package'?
- It sounds as if you can create packages by telling the system to look at a working IIS site. But if the packages are build from a CI environment, aren't you basically out of luck here? It feels like they designed some of this for small-scale developers deploying from their dev environment. That's a fine use case, but I'm interested in see what everyone's enterprise-experience is with the tool
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的应用程序没有使用 Visual Studio 2010,那么我建议您选择以下选项之一:
让我再解释一下。
选项 1
MSDeploy 本身不依赖于 MSBuild,因此您可以将其单独安装在构建服务器上来为您创建包。您可以从此处下载它。之后,您可以使用 Exec 任务创建 MSBuild 部署脚本来调用msdeploy.exe 以及用于创建包的命令。
关于第二个选项
.targets 文件以及 MSDeploy 的任务不是使用 .NET 框架部署的,而是使用 Visual Studio 2010 本身部署的。因此,如果您想利用其中任何一个,您必须在构建服务器上安装 VS 2010。
您在帖子中提到使用包目标。您将无法使用它,因为该目标是 .NET 4 项目的更大构建过程的一部分。您可以做的是创建一个单独的 MSBuild 文件(与您的项目文件不同),该文件使用 MSBuild 4 调用随 VS 2010 for Web 提供的任务部署。
在这里我专门回答您的编号列表
If you are not using Visual Studio 2010 for your application then I would suggest that you pick one of the following:
Let me explain it a bit more.
Option 1
MSDeploy itself has no dependency on MSBuild so you could install it by itself on your build server to create the packages for you. You can download it from here. After that you can create an MSBuild deployment script using the Exec task to call msdeploy.exe with the command to create your package.
About the second option
The .targets files as well as the tasks for MSDeploy are not deployed with the .NET framework, but with Visual Studio 2010 itself. So if you wanted to leverage any of those you would have to install VS 2010 on your build server.
You mentioned using the Package target in your post. You won't be able to use that because that target is a part of a bigger build process for .NET 4 projects. What you could do is to create a separate MSBuild file (separate as in not your project file) which uses MSBuild 4 to call the tasks that are delivered with VS 2010 for Web Deployment.
Here I answer your numbered list specifically