Packaging Azure Cloud Services
FAKE can be used to create a Azure Cloud Service package (.cspkg) for use with e.g. Worker Roles.
Currently it does not support publishing, and has several restrictions: -
- The service definition file must be called ServiceDefinition.csdef.
- It only works for single-role workers.
- It does not perform a build of the worker role project - this should be done beforehand.
- Always packages from the Release outputs.
Assume a solution with the following structure: -
- Contains a single role, "MyRole".
- Contains a
- Referenced by MyCloudService as a Role.
- Contains a typical
You can package this cloud service thus: -
1: 2: 3: 4: 5: 6:
This will build
MyCloudService.cspkg in the current directory (override using
When packaging occurs, the task will scan the local machine for installed Azure SDK versions; if none is specified,
it will pick the highest version installed. You can override this with the SdkVersion property e.g.
You can plug this into a regular FAKE pipeline as follows: -
1: 2: 3: