Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Confidential Ledger] Enable live testing #24912

Merged
merged 2 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions sdk/confidentialledger/test-resources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
lynshi marked this conversation as resolved.
Show resolved Hide resolved
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ledgerName": {
"type": "string",
"defaultValue": "[resourceGroup().name]",
"metadata": {
"description": "Ledger Name"
},
"minLength": 3,
"maxLength": 24
},
"resourceGroup": {
"type": "string",
"defaultValue": "[resourceGroup().name]",
"metadata": {
"description": "Resource Group containing the application."
}
},
"subscriptionId": {
"type": "string",
"defaultValue": "[subscription().subscriptionId]",
"metadata": {
"description": "Id of the subscription containing the application."
}
},
"tenantId": {
"type": "string",
"defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"metadata": {
"description": "The tenant ID to which the application and resources belong."
}
},
"testApplicationId": {
"type": "string",
"metadata": {
"description": "The application client ID used to run tests."
}
},
"testApplicationSecret": {
"type": "string",
"metadata": {
"description": "The application client secret used to run tests."
}
},
"testApplicationOid": {
"type": "string",
"defaultValue": "b3653439-8136-4cd5-aac3-2a9460871ca6",
"metadata": {
"description": "The client OID to grant access to test resources."
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "The location of the resource. By default, this is the same as the resource group."
}
}
},
"functions": [],
"variables": {
"azureConfidentialLedgerUrl": "[format('https://{0}.confidential-ledger.azure.com', parameters('ledgerName'))]"
},
"resources": [
{
"name": "[parameters('ledgerName')]",
"type": "Microsoft.ConfidentialLedger/ledgers",
"apiVersion": "2022-05-13",
"location": "[parameters('location')]",
"properties": {
"ledgerType": "Public",
"aadBasedSecurityPrincipals": [
{
"principalId": "[parameters('testApplicationOid')]",
"ledgerRoleName": "Administrator"
}
]
}
}
],
"outputs": {
"CONFIDENTIALLEDGER_SUBSCRIPTION_ID": {
"type": "string",
"value": "[parameters('subscriptionId')]"
},
"CONFIDENTIALLEDGER_TENANT_ID": {
"type": "string",
"value": "[parameters('tenantId')]"
},
"CONFIDENTIALLEDGER_CLIENT_ID": {
"type": "string",
"value": "[parameters('testApplicationId')]"
},
"CONFIDENTIALLEDGER_CLIENT_SECRET": {
"type": "string",
"value": "[parameters('testApplicationSecret')]"
},
"CONFIDENTIALLEDGER_ENDPOINT": {
"type": "string",
"value": "[variables('azureConfidentialLedgerUrl')]"
},
"CONFIDENTIALLEDGER_GROUP": {
"type": "string",
"value": "[parameters('resourceGroup')]"
}
}
}
13 changes: 13 additions & 0 deletions sdk/confidentialledger/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
trigger: none

stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
lynshi marked this conversation as resolved.
Show resolved Hide resolved
parameters:
BuildTargetingString: azure-confidentialledger*
ServiceDirectory: confidentialledger
MatrixReplace:
- TestSamples=.*/true
MaxParallel: 1
EnvVars:
TEST_MODE: "RunLiveNoRecord" # use when allowing preparers to create the rgs for you
AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script