Leon Cullens
Leon Cullens

Reputation: 12476

How to deploy multiple apps with Azure DevOps?

I have a .NET solution that contains several projects. I want to set up a deployment pipeline in Azure DevOps but I'm not sure how to do this. I want to have 1 pipeline that deploys the following projects:

How do I set this up? I selected the default 'Azure App Service Deploy' template, but in the deployment task I cannot select which project I want to deploy. The package refers to $(build.artifactstagingdirectory)/**/*.zip, but this is a zip file that contains the artifacts for both my web projects (and the database DACPAC is missing here).

Upvotes: 11

Views: 3649

Answers (2)

Srivatsa Marichi
Srivatsa Marichi

Reputation: 799

First things first. Copy the build artefacts into 3 different packages. Say,

  • Artefacts1: For Web Apps

  • Artefacts2: For Portal Apps

  • Artefacts3: For DACPAC files

In this case you will have 3 copy files task copying and 3 publish build artefacts task to publish it to Azure DevOps. In the release pipeline, add 3 agent jobs to perform

  • Deploy to Web App
  • Deploy to Portal App
  • Database DACPAC Deploy

You can refer this to have similar pipeline.

Upvotes: 1

4c74356b41
4c74356b41

Reputation: 72151

that's many questions in one, but I'd generally separate build\release pipelines for each application (that way you have more control) and you dont have the problem of how to select proper zip file. I'm pretty sure you cant even select a part of zip file (since you now have a single zip file with several solutions), so your approach is not going to work.

as for how to set this up: your build should build 1 project exactly and pack\upload it. and then your release will target that artifact and everything will work just fine.

Upvotes: 2

Related Questions