Skip to content

Commit b5717d2

Browse files
committed
Adding AppVeyor config and ARM template
1 parent 727065e commit b5717d2

2 files changed

Lines changed: 151 additions & 0 deletions

File tree

appveyor.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: '{build}'
2+
3+
pull_requests:
4+
do_not_increment_build_number: true
5+
6+
skip_branch_with_pr: true
7+
8+
skip_commits:
9+
files:
10+
- azuredeploy.json
11+
- README.md
12+
13+
image: Visual Studio 2017
14+
15+
build_script:
16+
- dotnet publish -c Release
17+
- 7z a latest.zip %APPVEYOR_BUILD_FOLDER%\AzureKeyVault.LetsEncrypt\bin\Release\netstandard2.0\publish\*
18+
19+
test: off
20+
21+
artifacts:
22+
- path: latest.zip
23+
24+
deploy:
25+
- provider: AzureBlob
26+
storage_account_name:
27+
secure: ce5QAXSDXBBksRBZWAm06g==
28+
storage_access_key:
29+
secure: B8HwCa5Hvbbgztfgiv1PRS05jp3h7X67QsWmwiFemXVp2AmdIEIrW6SF/ZNzDFEV90luZ7gavcPGrHPDBKhh70Yj+xJ+uAqGRwpgCQxiUVD+McXKQvAwtB4iP8XnsOpo
30+
container: azure-keyvault-letsencrypt
31+
set_content_type: true
32+
on:
33+
appveyor_repo_tag: true

azuredeploy.json

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"appName": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "The name of the function app that you wish to create."
9+
}
10+
},
11+
"mailAddress": {
12+
"type": "string",
13+
"metadata": {
14+
"description": "Email address for Let's Encrypt account."
15+
}
16+
}
17+
},
18+
"variables": {
19+
"functionAppName": "[parameters('appName')]",
20+
"hostingPlanName": "[parameters('appName')]",
21+
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'azfunctions')]",
22+
"storageAccountId": "[concat(resourceGroup().id, '/providers/', 'Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
23+
"mailAddress": "[parameters('mailAddress')]"
24+
},
25+
"resources": [
26+
{
27+
"type": "Microsoft.Storage/storageAccounts",
28+
"name": "[variables('storageAccountName')]",
29+
"apiVersion": "2015-05-01-preview",
30+
"location": "[resourceGroup().location]",
31+
"properties": {
32+
"accountType": "Standard_LRS"
33+
}
34+
},
35+
{
36+
"type": "Microsoft.Web/serverfarms",
37+
"name": "[variables('hostingPlanName')]",
38+
"apiVersion": "2015-04-01",
39+
"location": "[resourceGroup().location]",
40+
"properties": {
41+
"name": "[variables('hostingPlanName')]",
42+
"computeMode": "Dynamic",
43+
"sku": "Dynamic"
44+
}
45+
},
46+
{
47+
"type": "Microsoft.Insights/components",
48+
"name": "[variables('functionAppName')]",
49+
"apiVersion": "2014-04-01",
50+
"location": "[resourceGroup().location]",
51+
"tags": {
52+
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('functionAppName'))]": "Resource"
53+
},
54+
"properties": {
55+
"applicationId": "[variables('functionAppName')]"
56+
}
57+
},
58+
{
59+
"type": "Microsoft.Web/sites",
60+
"name": "[variables('functionAppName')]",
61+
"apiVersion": "2016-03-01",
62+
"location": "[resourceGroup().location]",
63+
"kind": "functionapp",
64+
"identity": {
65+
"type": "SystemAssigned"
66+
},
67+
"dependsOn": [
68+
"[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
69+
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
70+
"[resourceId('Microsoft.Insights/components', variables('functionAppName'))]"
71+
],
72+
"properties": {
73+
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
74+
"siteConfig": {
75+
"appSettings": [
76+
{
77+
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
78+
"value": "[reference(resourceId('Microsoft.Insights/components', variables('functionAppName')), '2015-05-01').InstrumentationKey]"
79+
},
80+
{
81+
"name": "AzureWebJobsDashboard",
82+
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountId'),'2015-05-01-preview').key1)]"
83+
},
84+
{
85+
"name": "AzureWebJobsStorage",
86+
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountId'),'2015-05-01-preview').key1)]"
87+
},
88+
{
89+
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
90+
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountId'),'2015-05-01-preview').key1)]"
91+
},
92+
{
93+
"name": "WEBSITE_CONTENTSHARE",
94+
"value": "[toLower(variables('functionAppName'))]"
95+
},
96+
{
97+
"name": "WEBSITE_RUN_FROM_PACKAGE",
98+
"value": "https://shibayan.blob.core.windows.net/azure-keyvault-letsencrypt/latest.zip"
99+
},
100+
{
101+
"name": "FUNCTIONS_EXTENSION_VERSION",
102+
"value": "~2"
103+
},
104+
{
105+
"name": "LetsEncrypt:SubscriptionId",
106+
"value": "[subscription().subscriptionId]"
107+
},
108+
{
109+
"name": "LetsEncrypt:Contacts",
110+
"value": "[variables('mailAddress')]"
111+
}
112+
],
113+
"clientAffinityEnabled": false
114+
}
115+
}
116+
}
117+
]
118+
}

0 commit comments

Comments
 (0)