vsts 自动部署到Azure

如果要部署到中国区的Azure ,请先阅读 http://www.cnblogs.com/cnryb/p/7867275.html

   

前置条件,我把代码托管在vsts(放在GitHub上也没问题,这里不讨论)中,使用git的方式

打开地址 https://cnryb.visualstudio.com/AzureChinaCiTest/AzureChinaCiTest%20Team/_build

点击 New

我这里测试的项目是 asp.net 项目,选择 ASP.NET (PREVIEW)

然后 Add a task

选择 Deploy - > Azure App Service Deploy

Azure subscription 选择对应的订阅

App Service name 选择对应的 app service name

把Package or folder中的$(System.DefaultWorkingDirectory) 替换成上一个task Publish Artifact Path to publish

   

然后 Agent queue 选择 Hosted VS2017 (根据项目情况选择)

   

接下来就可以开始测试了,点击 Save&Queue 就开始部署了。

原文地址:https://www.cnblogs.com/cnryb/p/7867479.html