azure - 部署从 Visual Studio Online 构建服务器构建的移动服务(.Net 后端)文件

标签 azure azure-mobile-services azure-devops

目前,我们的开发人员使用发布向导从 Visual Studio 2013 部署我们的移动服务(.Net 后端)。有时,这意味着开发人员部署的内容要么根本没有提交,要么不想推送到原始源代码控制存储库。我们已经使用 Visual Studio Online Build 服务器从源服务器进行持续集成,因此使用它构建的文件进行部署来消除这种风险是有意义的。

目前,我认为执行此操作的唯一方法是从 Visual Studio Online 构建门户执行“以 zip 形式下载”,然后执行 FTP 样式部署。这意味着我失去了仅上传更改的网络部署功能。

我注意到有一个名为 GitContinousDeploymentTemplate 的不同构建模板,它允许您指定 Windows Azure 部署环境,但这似乎仅适用于传统云服务或网站。

如果有人知道这样做的好方法,我们将不胜感激。

干杯

F

最佳答案

来自here

Found a solution.

  1. 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.

  2. 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/

相关文章:

azure - 从后台作业获取Token()

c# - 如何在 C# UWP 中从 Azure 移动应用程序读取数据

Azure 应用服务移动版 - 试用不可见

azure - 删除无法使用 CI CD 管道工作的数据工厂组件

visual-studio - 如何在最新版本的 VSTS 中添加 Nuget 包徽章

c# - 从 URL 将图像上传到 Azure Blob 存储

c# - 我可以在 C# 中创建 SAS url 来访问 Azure 文件共享(即不是 Blob)中目录的所有文件和文件夹吗?

c# - CSOM 在线共享点出现问题

c#-4.0 - 如何将多个对象插入到Azure移动服务表 Controller [.Net后端]

azure-devops - 如何在 VSTS 中将项目从 Scrum 更改为 CMMI