Skip to content

Commit 9b8cd90

Browse files
authored
Merge pull request KelvinTegelaar#2921 from JohnDuprey/dev
deployment updates
2 parents facbb46 + 85f9e44 commit 9b8cd90

File tree

2 files changed

+36
-81
lines changed

2 files changed

+36
-81
lines changed

deployment/AzureDeploymentTemplate.json

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
"metadata": {
2323
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token"
2424
}
25-
},
26-
"GithubAPIRepository": {
27-
"defaultValue": "https://github.com/KelvinTegelaar/CIPP-API",
28-
"type": "string",
29-
"metadata": {
30-
"description": "URL to your Github backend fork."
31-
}
3225
}
3326
},
3427
"variables": {
@@ -57,7 +50,7 @@
5750
"objectId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
5851
"permissions": {
5952
"keys": [],
60-
"secrets": ["all"],
53+
"secrets": [ "all" ],
6154
"certificates": []
6255
}
6356
}
@@ -116,7 +109,7 @@
116109
]
117110
}
118111
],
119-
"dependsOn": ["[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"]
112+
"dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('funcAppName'))]" ]
120113
},
121114
{
122115
"apiVersion": "2015-08-01",
@@ -135,7 +128,7 @@
135128
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverFarmName'))]",
136129
"siteConfig": {
137130
"Use32BitWorkerProcess": false,
138-
"powerShellVersion": "7.2",
131+
"powerShellVersion": "7.4",
139132
"appSettings": [
140133
{
141134
"name": "AzureWebJobsStorage",
@@ -154,45 +147,28 @@
154147
"value": "~4"
155148
},
156149
{
157-
"name": "ApplicationID",
158-
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationId)')]"
159-
},
160-
{
161-
"name": "ApplicationSecret",
162-
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationSecret)')]"
163-
},
164-
{
165-
"name": "RefreshToken",
166-
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/RefreshToken)')]"
167-
},
168-
{
169-
"name": "TenantID",
170-
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/tenantid)')]"
150+
"name": "WEBSITE_RUN_FROM_PACKAGE",
151+
"value": "1"
171152
},
172153
{
173154
"name": "FUNCTIONS_WORKER_RUNTIME",
174155
"value": "powershell"
175156
}
176157
]
177158
}
178-
},
179-
"resources": [
180-
{
181-
"apiVersion": "2015-08-01",
182-
"name": "web",
183-
"type": "sourcecontrols",
184-
"dependsOn": ["[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]"],
185-
"properties": {
186-
"RepoUrl": "[parameters('GithubAPIRepository')]",
187-
"repositoryToken": "[parameters('GithubToken')]",
188-
"token": "[parameters('GithubToken')]",
189-
190-
"branch": "master",
191-
"publishRunbook": true,
192-
"IsManualIntegration": true
193-
}
194-
}
195-
]
159+
}
160+
},
161+
{
162+
"name": "[concat(variables('funcAppName'), '/ZipDeploy')]",
163+
"type": "Microsoft.Web/sites/extensions",
164+
"apiVersion": "2021-02-01",
165+
"location": "[resourceGroup().location]",
166+
"dependsOn": [
167+
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
168+
],
169+
"properties": {
170+
"packageUri": "https://cippreleases.blob.core.windows.net/cipp-api/latest.zip"
171+
}
196172
},
197173
{
198174
"type": "Microsoft.Storage/storageAccounts",

deployment/AzureDeploymentTemplate_regionoptions.json

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
"metadata": {
2323
"description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token)"
2424
}
25-
},
26-
"GithubAPIRepository": {
27-
"defaultValue": "https://github.com/KelvinTegelaar/CIPP-API",
28-
"type": "string",
29-
"metadata": {
30-
"description": "URL to your Github backend fork."
31-
}
3225
}
3326
},
3427
"variables": {
@@ -57,7 +50,7 @@
5750
"objectId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
5851
"permissions": {
5952
"keys": [],
60-
"secrets": ["all"],
53+
"secrets": [ "all" ],
6154
"certificates": []
6255
}
6356
}
@@ -116,7 +109,7 @@
116109
]
117110
}
118111
],
119-
"dependsOn": ["[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"]
112+
"dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('funcAppName'))]" ]
120113
},
121114
{
122115
"apiVersion": "2015-08-01",
@@ -135,7 +128,7 @@
135128
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverFarmName'))]",
136129
"siteConfig": {
137130
"Use32BitWorkerProcess": false,
138-
"powerShellVersion": "7.2",
131+
"powerShellVersion": "7.4",
139132
"appSettings": [
140133
{
141134
"name": "AzureWebJobsStorage",
@@ -154,42 +147,28 @@
154147
"value": "~4"
155148
},
156149
{
157-
"name": "ApplicationID",
158-
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationId)')]"
159-
},
160-
{
161-
"name": "ApplicationSecret",
162-
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationSecret)')]"
163-
},
164-
{
165-
"name": "RefreshToken",
166-
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/RefreshToken)')]"
167-
},
168-
{
169-
"name": "TenantID",
170-
"value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/tenantid)')]"
150+
"name": "WEBSITE_RUN_FROM_PACKAGE",
151+
"value": "1"
171152
},
172153
{
173154
"name": "FUNCTIONS_WORKER_RUNTIME",
174155
"value": "powershell"
175156
}
176157
]
177158
}
178-
},
179-
"resources": [
180-
{
181-
"apiVersion": "2015-08-01",
182-
"name": "web",
183-
"type": "sourcecontrols",
184-
"dependsOn": ["[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]"],
185-
"properties": {
186-
"RepoUrl": "[parameters('GithubAPIRepository')]",
187-
"branch": "master",
188-
"publishRunbook": true,
189-
"IsManualIntegration": true
190-
}
191-
}
192-
]
159+
}
160+
},
161+
{
162+
"name": "[concat(variables('funcAppName'), '/ZipDeploy')]",
163+
"type": "Microsoft.Web/sites/extensions",
164+
"apiVersion": "2021-02-01",
165+
"location": "[resourceGroup().location]",
166+
"dependsOn": [
167+
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
168+
],
169+
"properties": {
170+
"packageUri": "https://cippreleases.blob.core.windows.net/cipp-api/latest.zip"
171+
}
193172
},
194173
{
195174
"type": "Microsoft.Storage/storageAccounts",

0 commit comments

Comments
 (0)