diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d81b55f4d8..3441c32584 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -79,6 +79,7 @@ steps: - task: SonarCloudPublish@1 displayName: 'Publish results on build summary' + condition: and(succeeded(), or(in(variables['Build.SourceBranch'], 'refs/heads/master', 'refs/heads/main'), eq(variables['Build.Reason'], 'PullRequest'))) inputs: pollingTimeoutSec: '300' diff --git a/azure/accounts.template.json b/azure/accounts.template.json index 0c59aa4c1f..ef8190df52 100644 --- a/azure/accounts.template.json +++ b/azure/accounts.template.json @@ -79,6 +79,9 @@ "defaultValue": [ ] }, + "sharedSQLServerName": { + "type": "string" + }, "sharedEnvVirtualNetworkName": { "type": "string" }, @@ -358,7 +361,7 @@ }, { "apiVersion": "2020-06-01", - "name": "worker-subnet", + "name": "eas-accounts-worker-subnet", "type": "Microsoft.Resources/deployments", "resourceGroup": "[parameters('sharedEnvResourceGroup')]", "properties": { @@ -386,6 +389,27 @@ } } }, + { + "apiVersion": "2021-04-01", + "name": "eas-accounts-worker-sql-firewall-rule", + "resourceGroup": "[parameters('sharedEnvResourceGroup')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('deploymentUrlBase'), 'sql-server-firewall-rules.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "serverName": { + "value": "[parameters('sharedSQLServerName')]" + }, + "subnetResourceIdList": { + "value": "[createArray(reference('eas-accounts-worker-subnet').outputs.SubnetResourceId.value)]" + } + } + } + }, { "apiVersion": "2020-06-01", "name": "WorkerAppServicePlan", @@ -435,7 +459,7 @@ "value": "[variables('resourceGroupName')]" }, "subnetResourceId": { - "value": "[reference('worker-subnet').outputs.SubnetResourceId.value]" + "value": "[reference('eas-accounts-worker-subnet').outputs.SubnetResourceId.value]" }, "appServiceAppSettings": { "value": { diff --git a/azure/finance.template.json b/azure/finance.template.json index e08ee540cb..e70ea3bef4 100644 --- a/azure/finance.template.json +++ b/azure/finance.template.json @@ -74,6 +74,9 @@ "type": "array", "defaultValue": [] }, + "sharedSQLServerName": { + "type": "string" + }, "sharedEnvVirtualNetworkName": { "type": "string" }, @@ -383,7 +386,7 @@ }, { "apiVersion": "2020-06-01", - "name": "worker-subnet", + "name": "eas-finance-worker-subnet", "type": "Microsoft.Resources/deployments", "resourceGroup": "[parameters('sharedEnvResourceGroup')]", "properties": { @@ -411,6 +414,27 @@ } } }, + { + "apiVersion": "2021-04-01", + "name": "eas-finance-worker-sql-firewall-rule", + "resourceGroup": "[parameters('sharedEnvResourceGroup')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(variables('deploymentUrlBase'), 'sql-server-firewall-rules.json')]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "serverName": { + "value": "[parameters('sharedSQLServerName')]" + }, + "subnetResourceIdList": { + "value": "[createArray(reference('eas-finance-worker-subnet').outputs.SubnetResourceId.value)]" + } + } + } + }, { "apiVersion": "2020-06-01", "name": "WorkerAppServicePlan", @@ -460,7 +484,7 @@ "value": "[variables('resourceGroupName')]" }, "subnetResourceId": { - "value": "[reference('worker-subnet').outputs.SubnetResourceId.value]" + "value": "[reference('eas-finance-worker-subnet').outputs.SubnetResourceId.value]" }, "appServiceAppSettings": { "value": {