具有多个项目的Azure连续部署 [英] Azure Continuous Deployment with multiple projects

查看:49
本文介绍了具有多个项目的Azure连续部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了一些问题(



在第一个Web App上,它将指向demo.Web项目文件,在第二个Web App上,它将指向将指向demo.Api项目文件。



您不需要TFS即可实现。



编辑:对于 ASPNET5 / MVC6 项目,只需将路径添加到要部署的 project.json文件夹中,则无需将.xproj添加到该路径。


I have found a few questions (this one, this one, and this one) related to this question, however none of them clearly answer my question: Do I really need TFS or VSO in order to achieve this?

What I have is: A solution with two projects: demo.Web and demo.Api.

In Azure I have demo-web.azurewebsites.net (with demo-web-staging.azurewebsites.net) and demo-api.azurewebsites.net (with demo-api-staging.azurewebsites.net).

I have the whole solution (with both projects each containing the correct publish profiles pointing to the correct deployment slot in azure) pushed to a git repo.

How could I tell demo.Web, go to demo-web-staging.azure... and demo.Api, go to demo-api-staging.azure...? Is the only way through TFS? I just cannot find any tutorials with multiple web apps on google.

Thanks.

解决方案

The answer is quite simple. Just bind the two Web Apps (one for the demo.Web and the other for demo.Api) to the same repo. Then, go to each other's Settings blade in the Azure Portal and look for Application Settings.

On the App Settings subsection, add a setting called "Project" whose value is the path to the .csproj that you want to build, relative to the repo's root folder.

On the first Web App it will point to the demo.Web project file, and on the second Web App, it will point to the demo.Api project file.

You don't need TFS to achieve it.

EDIT: For ASPNET5/MVC6 projects, just add the path to the "project.json" folder you want to deploy, you don't need to add the .xproj to the path.

这篇关于具有多个项目的Azure连续部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆