3

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.

4

1 回答 1

3

显然,根据这篇文章,该工作只是被放入与您网站文件夹中的工作名称相匹配的App_Data文件夹中。

您可能必须手动将作业作为 zip 文件上传一次,但之后我认为您可以在部署或构建后任务中做一些魔术来构建 Web 作业控制台应用程序并将其粘贴在适当的App_Data文件夹中。

于 2014-12-07T15:11:49.023 回答