Adding additional files to VSTS Release to azure web app

為{幸葍}努か 提交于 2021-02-07 20:24:52

问题


I have a release in VSTS to deploy my webapp to the azure app service. For this I use a Azure App Service deploy step. After the normal deploy of the webapp I want to add an additional zip artifact from another build result. I want to copy only those file to a specific path of the web application on azure. How can I do that?


回答1:


If the zip file is the web deploy package, you can refer to Joy’s answer. (Need to check Application option)

Otherwise, the simple way is using Kudu REST API (remain folder structure), steps:

  1. Uncheck Publish using Web Deploy option of Azure App Service Deploy task
  2. (Optional) Add Unzip task to extract zip files to a folder in artifact folder (the folder that you want in app service, e.g. D:/1/a/mylib)
  3. Specify folder (parent folder of step 2 to remain folder structure) or package (zip) in Package or folder input box



回答2:


You could use Virtual applications and directories to do it.You could check my steps.

  1. Go to azure portal -> APPLICATION -> APPLICATION SETTINGS->Virtual applications and directories
  2. set virtual directory with virtual path : /YourApplication to site\YourApplicationorsite\wwwroot\YourApplication
  3. Go to VSTS-> the release option-> the Deploy Azure App Service task
  4. set virtual application to /myApplication

Hope it can help you.



来源:https://stackoverflow.com/questions/49740986/adding-additional-files-to-vsts-release-to-azure-web-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!