VSTS部署到适用于Linux的Azure WebApp [英] VSTS Deploy to Azure WebApp For Linux
问题描述
是否可以将应用程序从VSTS部署到Linux上的WebApp.
Is it possible to deploy an application from VSTS to a WebApp on Linux.
我的Webapp是一个简单的ruby应用程序,我目前正在使用托管git repo对其进行部署,例如在文档中:
My Webapp is a simple ruby app and I'm currently deploying it with the hosted git repo like in the doc: https://docs.microsoft.com/en-us/azure/app-service/containers/quickstart-ruby
git remote add azure <Git deployment URL from above>
git add -A
git commit -m "Initial deployment commit"
git push azure master
有没有一种方法可以在VSTS中使用回购协议?
Is there a way to do it using a repo in VSTS?
推荐答案
首先,任务支持Linux应用程序服务类型上的Web App,因此您可以通过此任务来部署ruby应用程序,例如:
First, the Azure App Service Deployment task supports Web App on Linux app service type, so you can deploy your ruby app through this task, for example:
- 创建新的构建定义
- 使用相应的存储库和分支指定来源
- 添加存档文件任务以将必要的文件放入zip文件中
- 添加Azure App Service部署任务(应用程序类型:Linux Web App;图像源:内置图像;包或文件夹:[步骤3中的zip文件;运行时堆栈:Ruby 2.3)
注意:您可以通过Release进行部署.
Note: You can deploy it through Release.
第二,如果可以使用部署"选项,则可以在azure门户中对其进行配置:连续部署到Azure App Service .
Secondly, if Deployment option is available, you can configure it in azure portal: Continuous Deployment to Azure App Service.
另一方面,您也可以在使用时通过git命令将源推送到服务器:
On the other hand, you also can push source to server through git command as you are using:
- 添加命令行任务:(工具:
git
;参数:remove add azure [git deployment URL]
;工作文件夹:$(build.SourcesDirectory)
).注意:git部署URL应包含用户名和密码,例如:https://[username]:[password]@[app name].scm.azurewebsites.net/[app name].git
(用户名不能包含@
字符) - 与其他git命令相同
- Add Command Line task: (Tool:
git
; Arguments:remove add azure [git deployment URL]
; Working folder:$(build.SourcesDirectory)
). Note: the git deployment URL should contains username and password, for example:https://[username]:[password]@[app name].scm.azurewebsites.net/[app name].git
(username can’t contains@
character) - The same as other git command
这篇关于VSTS部署到适用于Linux的Azure WebApp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!