Configure Visual Studio Team Services to deploy WebJobs

751 Views Asked by At

I've used the following tutorial for my Web Apps.

https://www.visualstudio.com/ru-ru/docs/release/examples/azure/continuous-to-app-service

It shows how to setup Continuous Deployment in Azure Portal for Web Apps. It result in a build and a release definition in Visual Team Services. I've used them to get the basic configuration for my web apps and just adjusted the build and release definitions to fit my requirements.

But I can't find any tutorials or information on how to deploy my WebJobs with VS Team Services.

All my web jobs are located in separate app service without any web app. I've been using the "publish as azure webjob" functionality in Visual Studio to deploy the web jobs from my computer.

2

There are 2 best solutions below

0
On BEST ANSWER

Deploying a separate web job could be done in the same way as deploying a web app.

When one is using the build definition created by the Azure portal described in the tutorial in the question, there will also be zip a package for any web job in the solution.

One can just change the release definition to use that package and it will be deployed even without any web app.

1
On

There is a simple tutorial in the Azure documentation:

https://azure.microsoft.com/en-us/blog/enabling-command-line-or-continuous-delivery-of-azure-webjobs/

I would take this documentation and extract the command line arguments that are called during the msbuild shown and call it directly as part of my build as a Task in whatever build orcastration tool that you are using.