user1428619
user1428619

Reputation: 91

Deploying Azure WebJob using powershell automation

I'm trying to deploy an Azure WebJob using the Azure PowerShell SDK or Rest API and I'm having troubles finding support for deploying WebJobs. It's super simple to do through the UI in VS or Azure Management Portal but there doesn't seem to be much automation support.

According to some sites, when you deploy an Azure Website with an associated web job, it's supposed to deploy the Web Job automatically but I'm not seeing that happen when I publish the web project in VS and I don't see how that would work after the bits are compiled through TFS.

I've found some great resources that I've tried following but don't seem to be working for me: http://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs/#deploy http://azure.microsoft.com/blog/2014/08/18/enabling-command-line-or-continuous-delivery-of-azure-webjobs/ Unfortunately, I need to integrate this automation into a standalone deployment orchestration so I can't tie it to MSBuild.

I'd be happy with deploying both the Azure Website and the WebJob together if that's possible. I would imagine there must be a way to automate the uploading of a zip file containing the WebJob executable to the website like you can through the portal but I haven't had any luck finding it.

Upvotes: 3

Views: 5748

Answers (1)

jcvandan
jcvandan

Reputation: 14314

Apparently according to this post the job just gets put in a folder matching the job name in your websites App_Data folder.

You might have to manually upload the job as a zip file once, but afterwards I assumed you could do some magic in your deployment or in a post build task to build the web job console app and stick it in the appropriate App_Data folder.

Upvotes: 3

Related Questions