简体   繁体   中英

Azure Continuous Deployment with multiple projects

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM