从 MSBuild 解析 MSDeploy 的参数
我刚刚开始使用 TeamCity,它非常棒。现在,我在提交后将其部署到我的临时服务器,因此我始终知道我在那里运行着最新版本。 (这个想法借用自:http://www.agileatwork.com /automatic-deployment-from-teamcity-using-webdeploy/ )
但是当网站生成一些我不想在每次发布时删除的文件时,我发现了 MSDeploy 的参数
-enableRule:DoNotDeleteRule
但是我如何附加这个到 MSBuild 命令
MSBuild.exe MvcApplication1.sln
/p:Configuration=Debug
/p:OutputPath=bin
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:MsDeployServiceUrl=https://ss-iis:8172/MSDeploy.axd
/p:username=user
/p:password=pass
/p:AllowUntrustedCertificate=True
/p:DeployIisAppPath=foo.bar.tld
/p:MSDeployPublishMethod=WMSVC
这可以完成吗?
或者是否有更奇特的方式从 TeamCity 进行自动 Web 部署?
I have just started playing with TeamCity and its great. Now I got it to deploy to my staging server after a commit so I always know I have the latest version running there. ( The idea was borrowed from: http://www.agileatwork.com/automatic-deployment-from-teamcity-using-webdeploy/ )
But as the site generates some files which I dont want to wipe out on every publish I found the parameter to MSDeploy
-enableRule:DoNotDeleteRule
But how do I append this to MSBuild command
MSBuild.exe MvcApplication1.sln
/p:Configuration=Debug
/p:OutputPath=bin
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:MsDeployServiceUrl=https://ss-iis:8172/MSDeploy.axd
/p:username=user
/p:password=pass
/p:AllowUntrustedCertificate=True
/p:DeployIisAppPath=foo.bar.tld
/p:MSDeployPublishMethod=WMSVC
Can this be done?
Or is there are a more fancy way of doing automatic web deployments from TeamCity?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它可能是您想要的
/p:SkipExtraFilesOnServer=true
。It might be
/p:SkipExtraFilesOnServer=true
that you want.