Adds missing ACR resource definition for test infrastructure (#1359)
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
This commit is contained in:
parent
021bf0c065
commit
f6e6bd8120
24
.github/infrastructure/conformance/azure/conf-test-azure-container-registry.bicep
vendored
Normal file
24
.github/infrastructure/conformance/azure/conf-test-azure-container-registry.bicep
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// ------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation and Dapr Contributors.
|
||||
// Licensed under the MIT License.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
param acrName string
|
||||
param rgLocation string = resourceGroup().location
|
||||
param acrSku string = 'Standard'
|
||||
param confTestTags object = {}
|
||||
|
||||
resource acrResource 'Microsoft.ContainerRegistry/registries@2021-06-01-preview' = {
|
||||
name: acrName
|
||||
location: rgLocation
|
||||
tags: confTestTags
|
||||
sku: {
|
||||
name: acrSku
|
||||
}
|
||||
properties: {
|
||||
adminUserEnabled: false
|
||||
}
|
||||
}
|
||||
|
||||
@description('Output the login server property for later use')
|
||||
output loginServer string = acrResource.properties.loginServer
|
||||
|
|
@ -38,6 +38,7 @@ param certAuthSpId string
|
|||
param sqlServerAdminPassword string
|
||||
|
||||
var confTestRgName = '${toLower(namePrefix)}-conf-test-rg'
|
||||
var acrName = '${toLower(namePrefix)}registry'
|
||||
var cosmosDbName = '${toLower(namePrefix)}-conf-test-db'
|
||||
var eventGridTopicName = '${toLower(namePrefix)}-conf-test-eventgrid-topic'
|
||||
var eventHubsNamespaceName = '${toLower(namePrefix)}-conf-test-eventhubs'
|
||||
|
|
@ -53,6 +54,15 @@ resource confTestRg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
|
|||
tags: confTestTags
|
||||
}
|
||||
|
||||
module acr 'conf-test-azure-container-registry.bicep' = {
|
||||
name: acrName
|
||||
scope: resourceGroup(confTestRg.name)
|
||||
params: {
|
||||
confTestTags: confTestTags
|
||||
acrName: acrName
|
||||
}
|
||||
}
|
||||
|
||||
module cosmosDb 'conf-test-azure-cosmosdb.bicep' = {
|
||||
name: cosmosDbName
|
||||
scope: resourceGroup(confTestRg.name)
|
||||
|
|
@ -130,6 +140,7 @@ module storage 'conf-test-azure-storage.bicep' = {
|
|||
}
|
||||
|
||||
output confTestRgName string = confTestRg.name
|
||||
output acrName string = acr.name
|
||||
output cosmosDbName string = cosmosDb.name
|
||||
output cosmosDbSqlName string = cosmosDb.outputs.cosmosDbSqlName
|
||||
output cosmosDbSqlContainerName string = cosmosDb.outputs.cosmosDbSqlContainerName
|
||||
|
|
|
|||
|
|
@ -153,6 +153,8 @@ echo "CREDENTIALS_PATH=${CREDENTIALS_PATH}"
|
|||
##==============================================================================
|
||||
|
||||
# Constant environment variable names defined by tests or GitHub workflow
|
||||
ACR_VAR_NAME="AzureContainerRegistryName"
|
||||
|
||||
COSMOS_DB_VAR_NAME="AzureCosmosDB"
|
||||
COSMOS_DB_COLLECTION_VAR_NAME="AzureCosmosDBCollection"
|
||||
COSMOS_DB_MASTER_KEY_VAR_NAME="AzureCosmosDBMasterKey"
|
||||
|
|
@ -296,6 +298,8 @@ SQL_SERVER_NAME="$(az deployment sub show --name "${DEPLOY_NAME}" --query "prope
|
|||
echo "INFO: SQL_SERVER_NAME=${SQL_SERVER_NAME}"
|
||||
SQL_SERVER_ADMIN_NAME="$(az deployment sub show --name "${DEPLOY_NAME}" --query "properties.outputs.sqlServerAdminName.value" --output tsv)"
|
||||
echo "INFO: SQL_SERVER_ADMIN_NAME=${SQL_SERVER_ADMIN_NAME}"
|
||||
AZURE_CONTAINER_REGISTRY_NAME="$(az deployment sub show --name "${DEPLOY_NAME}" --query "properties.outputs.acrName.value" --output tsv)"
|
||||
echo "INFO: AZURE_CONTAINER_REGISTRY_NAME=${CONTAINER_REGISTRY_NAME}"
|
||||
|
||||
# Give the service principal used by the SDK write access to the entire resource group
|
||||
MSYS_NO_PATHCONV=1 az role assignment create --assignee "${SDK_AUTH_SP_ID}" --role "Contributor" --scope "/subscriptions/${SUB_ID}/resourceGroups/${RESOURCE_GROUP_NAME}"
|
||||
|
|
@ -597,6 +601,14 @@ IOT_HUB_PUBSUB_CONSUMER_GROUP_NAME="$(basename ${IOT_HUB_PUBSUB_CONSUMER_GROUP_F
|
|||
echo export ${IOT_HUB_PUBSUB_CONSUMER_GROUP_VAR_NAME}=\"${IOT_HUB_PUBSUB_CONSUMER_GROUP_NAME}\" >> "${ENV_CONFIG_FILENAME}"
|
||||
az keyvault secret set --name "${IOT_HUB_PUBSUB_CONSUMER_GROUP_VAR_NAME}" --vault-name "${KEYVAULT_NAME}" --value "${IOT_HUB_PUBSUB_CONSUMER_GROUP_NAME}"
|
||||
|
||||
# ---------------------------------------
|
||||
# Populate Managed Identity Test settings
|
||||
# ---------------------------------------
|
||||
echo "Configuring Azure Container Registry for Managed Identity Certification tests ..."
|
||||
echo export ${ACR_VAR_NAME}=\"${AZURE_CONTAINER_REGISTRY_NAME}\" >> "${ENV_CONFIG_FILENAME}"
|
||||
az keyvault secret set --name "${ACR_VAR_NAME}" --vault-name "${KEYVAULT_NAME}" --value "${AZURE_CONTAINER_REGISTRY_NAME}"
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# Display completion message
|
||||
# ---------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue