目前,我们的开发人员使用发布向导从 Visual Studio 2013 部署我们的移动服务(.Net 后端)。有时,这意味着开发人员部署的内容要么根本没有提交,要么不想推送到原始源代码控制存储库。我们已经使用 Visual Studio Online Build 服务器从源服务器进行持续集成,因此使用它构建的文件进行部署来消除这种风险是有意义的。
目前,我认为执行此操作的唯一方法是从 Visual Studio Online 构建门户执行“以 zip 形式下载”,然后执行 FTP 样式部署。这意味着我失去了仅上传更改的网络部署功能。
我注意到有一个名为 GitContinousDeploymentTemplate 的不同构建模板,它允许您指定 Windows Azure 部署环境,但这似乎仅适用于传统云服务或网站。
如果有人知道这样做的好方法,我们将不胜感激。
干杯
F
最佳答案
来自here
Found a solution.
In the build definition's MSBuild arguments, add the following:
/p:DeployOnBuild=true /p:PublishProfile="{publish name}" /p:AllowUntrustedCertificate=true /p:VisualStudioVersion=12.0 /p:UserName={username} /p:Password={pw}
You can obtain the value from the publishing profile that can be downloaded from the Mobile Service dashboard on Azure managament portal.
Under Deployment, add the path to pubxml file in source control under "Path to Deployment Settings". Note: add an extra backslash at the end of the path to escape the last "\".
One problem with this solution is that deployment happens regardless of your tests outcome, but that could possibly be remedied by modifying the build template. We used the GitContinuousDeploymentTemplate template in our case.
关于azure - 部署从 Visual Studio Online 构建服务器构建的移动服务(.Net 后端)文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23995431/