Skip to content

Commit 43f32a8

Browse files
Niall LangleyNJLangley
authored andcommitted
Added simple ARM script to deploy an ADLSv2 instance for integration/functional testing from within the CI build process.
1 parent e25100d commit 43f32a8

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
6+
"gitProject": {
7+
"type": "string",
8+
"defaultValue": "AzureDataPipelineTools"
9+
},
10+
"branch": {
11+
"type": "string"
12+
},
13+
"commit": {
14+
"type": "string"
15+
},
16+
"pullRequest": {
17+
"type": "string",
18+
"defaultValue": "N/A"
19+
},
20+
"location": {
21+
"type": "string",
22+
"defaultValue": "UK South"
23+
}
24+
},
25+
"variables": {
26+
"storageAccountApiVersion": "2019-06-01",
27+
"storageAccountName": "[concat('adls', substring(uniqueString(parameters('branch')), 0, 4), 'xxxx', substring(parameters('commit'), 0, min(length(parameters('commit')), 7)))]",
28+
"storageAccountResourceId": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
29+
},
30+
"resources": [
31+
{
32+
"name": "[variables('storageAccountName')]",
33+
"type": "Microsoft.Storage/storageAccounts",
34+
"apiVersion": "[variables('storageAccountApiVersion')]",
35+
"location": "[parameters('location')]",
36+
"properties": {
37+
"accessTier": "Hot",
38+
"minimumTlsVersion": "TLS1_2",
39+
"supportsHttpsTrafficOnly": true,
40+
"allowBlobPublicAccess": true,
41+
"allowSharedKeyAccess": true,
42+
"isHnsEnabled": true,
43+
"networkAcls": {
44+
"bypass": "AzureServices",
45+
"defaultAction": "Allow"
46+
}
47+
},
48+
"dependsOn": [],
49+
"sku": {
50+
"name": "Standard_LRS"
51+
},
52+
"kind": "StorageV2",
53+
"tags": {
54+
"Git Project": "[parameters('gitProject')]",
55+
"Commit": "[parameters('commit')]",
56+
"Branch": "[parameters('branch')]",
57+
"Pull Request": "[parameters('pullRequest')]",
58+
"Create Date Time": "2021-04-28T12:08:00"
59+
}
60+
}
61+
],
62+
"outputs": {
63+
"storageAccountName": {
64+
"type": "string",
65+
"value": "[variables('storageAccountName')]"
66+
},
67+
"storageAccountConnectionString": {
68+
"type": "string",
69+
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountResourceId'), variables('storageAccountApiVersion')).keys[0].value)]"
70+
}
71+
}
72+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"itemDisplayName": "CI Test Environment for sqlcollaborative/AzureDataPipelineTools",
3+
"githubUsername": "[email protected]",
4+
"description": "An ADLSv2 storage account.",
5+
"summary": "This template allows you to deploy an ADLSv2 storage account for the sqlcollaborative/AzureDataPipelineTools github projects to use for integration testing as part of it's CI build process."
6+
}

Azure-DevTestLab/readme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"name": "branch",
4+
"value": "test"
5+
},
6+
{
7+
"name": "commit",
8+
"value": "995102f73b8c64a4c412bcf99558ffdaec5edb19"
9+
}
10+
]

0 commit comments

Comments
 (0)