1
votes

I'm having trouble deploying a webjob with an azure website via bitbucket. The website deploys fine whenever I push changes to the correct branch but the webjob doesn't go with it.

I've linked the webjob according to the azure guide (http://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs/)

Anyone else had any joy with this kind of setup?

1

1 Answers

1
votes

Ok, so it turns out a comment regarding VSO on the same link I provided also works for BitBucket, I've included the comment here for reference...

A fix for this issue should come soon, for now as a temporary workaround:

Create a "webjobs.props" file and add it to your Properties folder in whichever project you want to publish from. (Both WebJob and WAP if you want to publish from either)

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <CopyAllFilesToSingleFolderForPackageDependsOn>
      $(CopyAllFilesToSingleFolderForPackageDependsOn);
      AddWebJobFilesToPublish;
    </CopyAllFilesToSingleFolderForPackageDependsOn>
    <_DestinationType>AzureWebSite</_DestinationType>
  </PropertyGroup>
</Project>

Comment provided by amitpal @ https://gist.github.com/amitapl/ff51f6ecc7cc052ef0f7