Permalink
Switch branches/tags
Nothing to show
Find file Copy path
2907110 Oct 15, 2015
137 lines (136 sloc) 3.46 KB
{
"$schema":"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion":"1.0.0.0",
"parameters":{
"siteName":{
"type":"string"
},
"hostingPlanName":{
"type":"string"
},
"siteLocation":{
"type":"string"
},
"sku":{
"type":"string",
"allowedValues":[
"Free",
"Shared",
"Basic",
"Standard"
],
"defaultValue":"Free"
},
"workerSize":{
"type":"string",
"allowedValues":[
"0",
"1",
"2"
],
"defaultValue":"0"
},
"repoUrl":{
"type":"string"
},
"branch":{
"type":"string",
"defaultValue":"master"
},
"jobCollectionName":{
"type":"string"
}
},
"resources":[
{
"apiVersion":"2014-11-01",
"name":"[parameters('hostingPlanName')]",
"type":"Microsoft.Web/serverfarms",
"location":"[parameters('siteLocation')]",
"properties":{
"name":"[parameters('hostingPlanName')]",
"sku":"[parameters('sku')]",
"workerSize":"[parameters('workerSize')]",
"numberOfWorkers":1
}
},
{
"apiVersion":"2014-11-01",
"name":"[parameters('siteName')]",
"type":"Microsoft.Web/sites",
"location":"[parameters('siteLocation')]",
"dependsOn":[
"[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
],
"properties":{
"serverFarm":"[parameters('hostingPlanName')]"
},
"resources":[
{
"apiVersion":"2014-04-01",
"name":"web",
"type":"sourcecontrols",
"dependsOn":[
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"properties":{
"RepoUrl":"[parameters('repoUrl')]",
"branch":"[parameters('branch')]",
"IsManualIntegration":true
}
}
]
},
{
"apiVersion":"2014-08-01-preview",
"name":"[parameters('jobCollectionName')]",
"type":"Microsoft.Scheduler/jobCollections",
"dependsOn":[
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"location":"[parameters('siteLocation')]",
"properties":{
"sku":{
"name":"standard"
},
"quota":{
"maxJobCount":"10",
"maxRecurrence":{
"Frequency":"minute",
"interval":"1"
}
}
},
"resources":[
{
"apiVersion":"2014-08-01-preview",
"name":"DavidJob",
"type":"jobs",
"dependsOn":[
"[resourceId('Microsoft.Scheduler/jobCollections', parameters('jobCollectionName'))]"
],
"properties":{
"startTime":"2015-02-10T00:08:00Z",
"action":{
"request":{
"uri":"[concat(list(resourceId('Microsoft.Web/sites/config', parameters('siteName'), 'publishingcredentials'), '2014-06-01').properties.scmUri, '/api/triggeredjobs/MyScheduledWebJob/run')]",
"method":"POST"
},
"type":"http",
"retryPolicy":{
"retryType":"Fixed",
"retryInterval":"PT1M",
"retryCount":2
}
},
"state":"enabled",
"recurrence":{
"frequency":"minute",
"interval":1
}
}
}
]
}
]
}