AppVeyor allows publishing of
.zip artifacts as Azure WebJob.
There are two types of WebJob:
WebJob artifact must be a
.zip archive that contains either executable (
.exe) or batch (
.bat) file. See this page for detailed requirements to job archive contents.
To publish WebJob you need to know website Web Deploy credentials (username and password). Web Deploy credentials can be found in publish profile XML downloaded from website settings page (Download publish profile button) in Azure Portal.
Triggered job schedule must be specified in crontab format.
For Azure WebJobs schedule must have 6 fields:
* * * * * * - - - - - - | | | | | | | | | | | +----- day of week (0 - 6) (Sunday=0) | | | | +------- month (1 - 12) | | | +--------- day of month (1 - 31) | | +----------- hour (0 - 23) | +------------- min (0 - 59) +--------------- second (0 -59)
Azure WebJobs implementation uses NCrontab library. You can read more about crontab expression syntax implemented by this library and some find examples, but remember to add
0 as the first field for seconds.
website) - Azure website name without
username) - Web Deploy username.
password) - Web Deploy password.
job_name) - Optional. Job name - can contain alphanumerics and dashes, for example
job_schedule) - Optional. Job run schedule in crontab format. If schedule is not specified and job is not set as Manually triggered, job is published as continuous job; otherwise triggered.
manually_triggered) - Optional. If set schedule is ignored.
artifact) - Optional. Artifact “deployment name” or filename to push. If not specified all
.zipartifacts from selected build will be published as WebJobs. If you are publishing multiple jobs in a single deployment then omit
job_namesetting - this case job name will be extrapolated from artifact file name.
deploy: - provider: AzureWebJob website: mywebsite username: $mywebsite password: secure: AAABBB33CC/DDD+EEE== artifact: myjob.zip job_name: myjob-1 job_schedule: '* 0 * * * *'