I have a Jenkins job that creates and deploys a website package.
When I run the job from Jenkins it creates a package for each project and the deployment package doesn't contain the webjobs. However, the same msbuild command from command line it does create a package file bigger including the webjobs in it.
I have tried running the msbuild command line using the same user account Jenkins service and does work as well.
If I compare both msbuild output logs, I get a few differences being the main difference the command line msbuild log includes:
Target "DiscoverWebJobs" in file "E:\Jenkins\jobs\Queue - Publish\workspace\tvdQueue\packages\Microsoft.Web.WebJobs.Publish.1.0.12\tools\webjobs.wap.targets" from project "E:\Jenkins\jobs\Queue - Publish\workspace\tvdQueue\WebAPI\WebAPI.csproj" (target "Build" depends on it):
Task "Message"
WebJobs: reading [E:\Jenkins\jobs\Publish job\workspace\Project\WebAPI\Properties\webjobs-list.json]
Done executing task "Message".
Using "ReadWebJobsConfigFile" task from assembly "E:\Jenkins\jobs\Publish job\workspace\Project\packages\Microsoft.Web.WebJobs.Publish.1.0.12\tools\Microsoft.Web.WebJobs.Publish.Tasks.dll".
Task "ReadWebJobsConfigFile"
Done executing task "ReadWebJobsConfigFile".
Task "Message"
WebJobs: WebJobs found: [../blah1.csproj;../blah2.csproj;../blah3.csproj;]
Done executing task "Message".
Done building target "DiscoverWebJobs" in project "WebAPI.csproj"
I tried to add the target "DiscoverWebJobs" in the Jenkins command line but it says it cannot be found... I've spent loads of time trying different options, running from different accounts, using powershell, ... but nothing and I'm sure is something silly.
If the zip package file doesn't include the webjobs files, when I do the deployment it doesn't update the webjobs. I could deploy each zip file separately but there are a few webjobs and if anyone includes a new one it would not be deployed making the continuous integration setup for this project useless.
/v:d
to the msbuild command) from jenkins maybe the log will have an explnataion of why that target was skipped. Look for lines containing 'WebJobs' e.g. Target DiscoverWebJobs skipeed because ... – stijn