使用 Team Build 和 Web 部署部署 Web 应用程序
所以,这就是交易。在 Web 应用程序项目设置中,我配置了一个部署包,其中包括所有内容文件以及站点和应用程序的 IIS 设置。应用程序池。现在,当我转到 Team Build 构建配置时,我使用以下参数来部署站点。
/p:UseWPP_CopyWebApplication=True
/p:PipelineDependsOnBuild=False
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=True
/p:MSDeployPublishMethod=WMSVC
/p:MSDeployServiceUrl=https://<servername>:8172/MsDeploy.axd
/p:AllowUntrustedCertificate=True
/p:DeployIisAppPath="mysite.com"
/p:UserName=<domain>\<user>
/p:Password=<password>
虽然这实际上有效,但如果目标服务器上不存在“mysite.com”站点或者应用程序池设置不正确(即 ASP.NET 版本不匹配),部署将会失败。因此,我发现自己先手动创建这些内容,然后才能从 Team Build 部署任何内容。有没有办法自动执行此操作?我是否缺少某种参数开关?我想用另一种方式来表达这个问题,就是为什么当包包含所有 IIS 设置并且应该部署时我必须设置所有这些。
感谢您的任何帮助/解释。
编辑:
我不完全确定这是否属实,但我相信我将无法创建网站/应用程序池。根据我的理解,Team Build 使用 msbuild 与 msdeploy 进行对话,而该链接的功能非常有限。因此,我可能正在考虑更改构建工作流程模板以执行命令行来部署包(?)。
So, here is the deal. In web app project settings I configured a deployment package which includes all content files along with IIS settings for the site & app pool. Now, when i go to Team Build build config, I use the following arguments to deploy the site.
/p:UseWPP_CopyWebApplication=True
/p:PipelineDependsOnBuild=False
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=True
/p:MSDeployPublishMethod=WMSVC
/p:MSDeployServiceUrl=https://<servername>:8172/MsDeploy.axd
/p:AllowUntrustedCertificate=True
/p:DeployIisAppPath="mysite.com"
/p:UserName=<domain>\<user>
/p:Password=<password>
While this actually works, the deployment will fail if "mysite.com" site doesn't exist on the destination server or if the app pool isn't set up correctly (i.e. ASP.NET version mismatch). So i find myself creating this stuff manually before i can deploy anything from Team Build. Is there a way to automate this? Am i missing some kind of argument switch? I guess another way to phrase this question, is why do i have to set all this up when the package includes all of IIS settings and should just deploy.
Thanks for any help/explanation.
EDIT:
I'm not entirely sure if this is true, but i believe i will not be able to do create site/app pool. From my understanding of things, Team Build uses msbuild to talk to msdeploy and that link is very limited in what it can do. So, I may be looking at changing the build workflow template to execute the command line to deploy the package (?).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看有关 iisApp 提供商的 TechNet 文档:
http://technet.microsoft.com/en-us/库/dd569054(WS.10).aspx。 参数感兴趣:
Check out the TechNet documentation on the iisApp provider at
http://technet.microsoft.com/en-us/library/dd569054(WS.10).aspx. Of the four parameters, these are the ones you'd probably be interested in: