diff --git a/sdk/storage/storage-blob/tests.yml b/sdk/storage/storage-blob/tests.yml index 7963dd7bd234..b63d7c1a5b33 100644 --- a/sdk/storage/storage-blob/tests.yml +++ b/sdk/storage/storage-blob/tests.yml @@ -9,6 +9,68 @@ resources: name: Azure/azure-sdk-tools endpoint: azure jobs: - - template: ../archetype-sdk-tests-storage.yml + - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml parameters: PackageName: "@azure/storage-blob" + ResourceServiceDirectory: storage + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + ACCOUNT_NAME: $(STORAGE_ACCOUNT_NAME) + ACCOUNT_KEY: $(STORAGE_ACCOUNT_KEY) + ACCOUNT_SAS: $(STORAGE_ACCOUNT_SAS) + STORAGE_CONNECTION_STRING: $(STORAGE_CONNECTION_STRING) + Matrix: + Linux_Node8: + OSVmImage: "ubuntu-16.04" + NodeVersion: "8.x" + TestType: "node" + Linux_Node10: + OSVmImage: "ubuntu-16.04" + NodeVersion: "10.x" + TestType: "node" + Linux_Node12: + OSVmImage: "ubuntu-16.04" + NodeVersion: "12.x" + TestType: "node" + Windows_Node8: + OSVmImage: "windows-2019" + NodeVersion: "8.x" + TestType: "node" + Windows_Node10: + OSVmImage: "windows-2019" + NodeVersion: "10.x" + TestType: "node" + Windows_Node12: + OSVmImage: "windows-2019" + NodeVersion: "12.x" + TestType: "node" + macOS_Node8: + OSVmImage: "macOS-10.13" + NodeVersion: "8.x" + TestType: "node" + macOS_Node10: + OSVmImage: "macOS-10.13" + NodeVersion: "10.x" + TestType: "node" + macOS_Node12: + OSVmImage: "macOS-10.13" + NodeVersion: "12.x" + TestType: "node" + Browser_Linux_Node10: + OSVmImage: "ubuntu-16.04" + NodeVersion: "10.x" + TestType: "browser" + Browser_Windows_Node10: + OSVmImage: "windows-2019" + NodeVersion: "10.x" + TestType: "browser" + Browser_macOS_Node10: + OSVmImage: "macOS-10.13" + NodeVersion: "10.x" + TestType: "browser" + Linux_Sample10: + OSVmImage: "ubuntu-16.04" + NodeVersion: "10.x" + TestType: "sample" diff --git a/sdk/storage/storage-file-datalake/tests.yml b/sdk/storage/storage-file-datalake/tests.yml index 33026dbd337b..28fb4a6397f9 100644 --- a/sdk/storage/storage-file-datalake/tests.yml +++ b/sdk/storage/storage-file-datalake/tests.yml @@ -11,4 +11,4 @@ resources: jobs: - template: ../archetype-sdk-tests-storage.yml parameters: - PackageName: "@azure/storage-file-datalake" + PackageName: "@azure/storage-file-datalake" \ No newline at end of file diff --git a/sdk/storage/storage-file-share/tests.yml b/sdk/storage/storage-file-share/tests.yml index f3e69a2dcaad..18f916525ec5 100644 --- a/sdk/storage/storage-file-share/tests.yml +++ b/sdk/storage/storage-file-share/tests.yml @@ -9,6 +9,68 @@ resources: name: Azure/azure-sdk-tools endpoint: azure jobs: - - template: ../archetype-sdk-tests-storage.yml + - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-integration.yml parameters: PackageName: "@azure/storage-file-share" + ResourceServiceDirectory: storage + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + ACCOUNT_NAME: $(STORAGE_ACCOUNT_NAME) + ACCOUNT_KEY: $(STORAGE_ACCOUNT_KEY) + ACCOUNT_SAS: $(STORAGE_ACCOUNT_SAS) + STORAGE_CONNECTION_STRING: $(STORAGE_CONNECTION_STRING) + Matrix: + Linux_Node8: + OSVmImage: "ubuntu-16.04" + NodeVersion: "8.x" + TestType: "node" + Linux_Node10: + OSVmImage: "ubuntu-16.04" + NodeVersion: "10.x" + TestType: "node" + Linux_Node12: + OSVmImage: "ubuntu-16.04" + NodeVersion: "12.x" + TestType: "node" + Windows_Node8: + OSVmImage: "windows-2019" + NodeVersion: "8.x" + TestType: "node" + Windows_Node10: + OSVmImage: "windows-2019" + NodeVersion: "10.x" + TestType: "node" + Windows_Node12: + OSVmImage: "windows-2019" + NodeVersion: "12.x" + TestType: "node" + macOS_Node8: + OSVmImage: "macOS-10.13" + NodeVersion: "8.x" + TestType: "node" + macOS_Node10: + OSVmImage: "macOS-10.13" + NodeVersion: "10.x" + TestType: "node" + macOS_Node12: + OSVmImage: "macOS-10.13" + NodeVersion: "12.x" + TestType: "node" + Browser_Linux_Node10: + OSVmImage: "ubuntu-16.04" + NodeVersion: "10.x" + TestType: "browser" + Browser_Windows_Node10: + OSVmImage: "windows-2019" + NodeVersion: "10.x" + TestType: "browser" + Browser_macOS_Node10: + OSVmImage: "macOS-10.13" + NodeVersion: "10.x" + TestType: "browser" + Linux_Sample10: + OSVmImage: "ubuntu-16.04" + NodeVersion: "10.x" + TestType: "sample" diff --git a/sdk/storage/storage-queue/tests.yml b/sdk/storage/storage-queue/tests.yml index baad93d669a7..a0f4b4e5ca93 100644 --- a/sdk/storage/storage-queue/tests.yml +++ b/sdk/storage/storage-queue/tests.yml @@ -11,4 +11,4 @@ resources: jobs: - template: ../archetype-sdk-tests-storage.yml parameters: - PackageName: "@azure/storage-queue" + PackageName: "@azure/storage-queue" \ No newline at end of file diff --git a/sdk/storage/test-resources.json b/sdk/storage/test-resources.json new file mode 100644 index 000000000000..ade407a4d644 --- /dev/null +++ b/sdk/storage/test-resources.json @@ -0,0 +1,245 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "string", + "metadata": { + "description": "The base resource name." + } + }, + "testApplicationOid": { + "type": "string", + "metadata": { + "description": "The client OID to grant access to test resources." + } + } + }, + "variables": { + "storageApiVersion": "2019-04-01", + "location": "[resourceGroup().location]", + "accountName": "[parameters('baseName')]", + "datalakeAccountName": "[concat('d', parameters('baseName'))]", + "accountNameTidy": "[toLower(trim(variables('accountName')))]", + "blobEndPoint": "[concat('https://',variables('accountNameTidy'),'.blob.core.windows.net/')]", + "endpointSuffix": "core.windows.net", + "accountSasProperties": { + "signedServices": "bfqt", + "signedPermission": "rwdlacup", + "signedResourceTypes": "sco", + "keyToSign": "key2", + "signedExpiry": "2022-01-01T23:59:00Z" + }, + "authorizationApiVersion": "2018-01-01-preview", + "blobDataContributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe')]" + }, + "resources": [ + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(concat('blobDataContributorRoleId', variables('accountName')))]", + "dependsOn": [ + "[variables('accountName')]" + ], + "properties": { + "roleDefinitionId": "[variables('blobDataContributorRoleId')]", + "principalId": "[parameters('testApplicationOid')]" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('accountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [ + ], + "ipRules": [ + ], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + }, + "resources": [ + { + "name": "default", + "type": "blobServices", + "apiVersion": "[variables('storageApiVersion')]", + "dependsOn": [ + "[variables('accountName')]" + ], + "properties": { + "cors": { + "corsRules": [ + { + "allowedOrigins": [ + "*" + ], + "allowedMethods": [ + "DELETE", + "GET", + "HEAD", + "MERGE", + "POST", + "OPTIONS", + "PUT", + "PATCH" + ], + "maxAgeInSeconds": 86400, + "exposedHeaders": [ + "*" + ], + "allowedHeaders": [ + "*" + ] + } + ] + } + }, + "resources": [ + ] + }, + { + "name": "default", + "type": "fileServices", + "apiVersion": "[variables('storageApiVersion')]", + "dependsOn": [ + "[variables('accountName')]" + ], + "properties": { + "cors": { + "corsRules": [ + { + "allowedOrigins": [ + "*" + ], + "allowedMethods": [ + "DELETE", + "GET", + "HEAD", + "MERGE", + "POST", + "OPTIONS", + "PUT" + ], + "maxAgeInSeconds": 86400, + "exposedHeaders": [ + "*" + ], + "allowedHeaders": [ + "*" + ] + } + ] + } + }, + "resources": [ + ] + } + + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('datalakeAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "isHnsEnabled": true, + "cors": { + "corsRules": [ + { + "allowedOrigins": [ + "*" + ], + "allowedMethods": [ + "DELETE", + "GET", + "HEAD", + "MERGE", + "POST", + "OPTIONS", + "PUT", + "PATCH" + ], + "maxAgeInSeconds": 86400, + "exposedHeaders": [ + "*" + ], + "allowedHeaders": [ + "*" + ] + } + ] + }, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [ + ], + "ipRules": [ + ], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + } + ], + "outputs": { + "STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('accountName')]" + }, + "STORAGE_DATALAKE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('datalakeAccountName')]" + }, + "STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('accountName')), variables('storageApiVersion')).keys[0].value]" + }, + "STORAGE_ACCOUNT_SAS": { + "type": "string", + "value": "[concat('?', listAccountSas(variables('accountNameTidy'), variables('storageApiVersion'), variables('accountSasProperties')).accountSasToken)]" + }, + "STORAGE_CONNECTION_STRING": { + "type": "string", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('accountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('accountName')), variables('storageApiVersion')).keys[0].value, ';EndpointSuffix=', 'core.windows.net')]" + } + } +}