VSTS部署到适用于Linux的Azure WebApp

编程入门 行业动态 更新时间:2024-10-27 16:38:12
本文介绍了VSTS部署到适用于Linux的Azure WebApp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以将应用程序从VSTS部署到Linux上的WebApp.

Is it possible to deploy an application from VSTS to a WebApp on Linux.

我的Webapp是一个简单的ruby应用程序,我目前正在使用托管git repo对其进行部署,例如在文档中: docs.microsoft/zh-cn/azure/app-service/containers/quickstart-ruby

My Webapp is a simple ruby app and I'm currently deploying it with the hosted git repo like in the doc: docs.microsoft/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?

推荐答案

首先,"Azure应用程序服务部署" 任务支持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应包含用户名和密码,例如:[username]:[password]@[app name].scm.azurewebsites/[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: [username]:[password]@[app name].scm.azurewebsites/[app name].git (username can’t contains @ character)
  • The same as other git command
  • 更多推荐

    VSTS部署到适用于Linux的Azure WebApp

    本文发布于:2023-11-16 19:35:05,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1607175.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:适用于   VSTS   Linux   WebApp   Azure

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!