Packaging and Deploying Azure WebJobs
Note: This documentation is for FAKE before version 5 (or the non-netcore version). The new documentation can be found here
FAKE can be used to zip the output directory of a project and push it to Azure via the zip controller.
You'll need to know the http authentication details of the website to publish the web jobs to. If the web job does not already exist, it will be created as part of the deploy.
In your build.fsx
add the following:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: |
|
In the dependencies section add the targets to the build order after the build action:
1: 2: 3: 4: 5: 6: 7: |
|
The will create a zip file in the bin
folder in the root which contains the contents of the bin/release
folder of each web job to deploy and push it to azure.
Caveats
The zip controller will not remove files.
val private jobTypePath : webJobType:'a -> 'b
val webJobType : 'a
val private createWebJob : site:'a -> name:'b -> jobType:'c -> project:'d -> 'e
val site : 'a
val name : 'a
val jobType : 'a
val project : 'a
val path : obj
val sprintf : format:Printf.StringFormat<'T> -> 'T
val webJobs : site:'a -> 'b list
val site : obj
val webSite : obj