Lassi Autio
Lassi Autio

Reputation: 1249

How to deploy Azure Webjob from Azure DevOps to wwwroot\App_Data\jobs\triggered\MyWebJob?

I have a release pipeline for a web app. Now I want to release also webjobs from the same solution. But if I publish a webjob after I have published a web app, it will publish it to wwwroot and overwrites my web app. How should I configure release pipeline to deploy webjob to wwwroot\App_Data\jobs\triggered\MyWebJob, not to wwwroot?

Somewhere was an answer to build and publish whole solution and webjobs will be also deployed successfully. But I am not able to build and publish the whole solution. I have to pick just some of the projects (csproj).

Upvotes: 1

Views: 1782

Answers (1)

Ryan Hill
Ryan Hill

Reputation: 1942

If I'm understanding you correctly, you have a web project along with two web jobs that you want to deploy to Azure App services using Azure Dev Ops. If that's the case, I would suggest deploying your web jobs to separate app services. If your app service is under a standard or premium plan, you can leverage deployment slots. The Visual Studio Build task will zip up your projects for Web Deploy so on the release side of the pipeline you'll simply select the project zip file from the artifact for the Azure App Service Deploy.

Hope this helps.

Upvotes: 0

Related Questions