1
votes

I am trying to deploy a continuous queue-triggered WebJob onto an Azure instance but I'm getting some issues that I was hoping someone could help me.

When I publish from Visual Studio (2015), it goes into the WebApp's app_data folder under jobs folder. I can see the WebJob from the portal under the WebJobs settings section. All is good.

I am trying to automate this through VSTS and that's where I am getting issues. When I deploy it using the Azure App Service Deploy task it adds it to the root folder of the WebApp, i.e. wwwroot folder. From other StackOverflow questions it seems that if I package it into a zip folder and deploy the zip folder it should work. Unfortunately I get the same issue.

I'm probably doing something silly but if someone could suggest where I'm going wrong then that would be great.

Build Definition

  1. Nuget (restore) on the sln file

  2. Visual Studio Build. VS2015 on the sln file with MSBuild args of /p:WebPublishMethod=Package

    1. I am actually using SlowCheetah so for each of my environment I have a Build task so that I can build it with the correct settings for the environment.
  3. Copy bin files to $(build.artifactstagingdirectory)

  4. Archive to $(build.artifactstagingdirectory) as well

  5. Publish

Release definition

  1. Azure App Service Deploy
    1. App type and app service name pointing to web app and the web app on my azure account
    2. Package or folder set to the zip file

Screenshots attached below. Any suggestions on what I'm doing wrong?

Kind regards Sidharth

Build definition 1 Release definition 1

1
If you look at the zip file that is produced, is it missing the App_Data/... folders? If so, that'll isolate the issue to the build definition, and away from the release part.David Ebbo
Hi David, Thanks for the quick response. The zip file doesn't have the app_data folder. Oh, so the zip folder should have the whole folder structure to where the web job is to reside in the web app? I.e. app_data/jobs/continuous/webjobname? I'll try that out and report back here.SKN
@S-N Yes, you are right.starian chen-MSFT
Do you solve this issue?starian chen-MSFT

1 Answers

0
votes

I assume it isn’t a webjob project, but a general project (e.g. console application).

The simple way to deal with it is copying files to corresponding folder, for example:

  1. Copy files (Target Folder: $(build.artifactstagingdirectory)/app_data/jobs/triggered/WebJob1)
  2. Archive files (Root folder (or file) to archive: $(build.artifactstagingdirectory)/app_data; Check Prefix root folder name to archive paths; option)