Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ resources:
- repository: das-platform-building-blocks
type: github
name: SkillsFundingAgency/das-platform-building-blocks
ref: refs/tags/2.2.25
ref: refs/tags/2.1.28
endpoint: SkillsFundingAgency
- repository: das-platform-automation
type: github
name: SkillsFundingAgency/das-platform-automation
ref: refs/tags/5.1.18
ref: refs/tags/5.1.8
endpoint: SkillsFundingAgency
pipelines:
- pipeline: das-employer-config
Expand Down
133 changes: 56 additions & 77 deletions azure/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,31 +127,6 @@
"minimumTlsVersion": {
"type": "string",
"defaultValue": "TLS1_2"
},
"applicationInsightsConnectionString": {
"type": "securestring",
"metadata": {
"description": "Shared application insights connection string retrieved from the get-product-app-insights step"
}
},
"applicationInsightsResourceId": {
"type": "string",
"metadata": {
"description": "Shared application insights resource ID retrieved from the get-product-app-insights step"
}
},
"alertActionGroupResourceId": {
"type": "string",
"metadata": {
"description": "Alert group resource ID found in the management resources variable groups"
}
},
"enableFailedRequestAlert": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Enables alerting on app insights failed requests"
}
}
},
"variables": {
Expand Down Expand Up @@ -285,6 +260,33 @@
"[variables('resourceGroupName')]"
]
},
{
"apiVersion": "2021-04-01",
"name": "[concat(variables('workerV2AppServiceName'), '-application-insights-', parameters('utcValue'))]",
"resourceGroup": "[variables('resourceGroupName')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'), 'application-insights.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"appInsightsName": {
"value": "[variables('workerV2AppServiceName')]"
},
"attachedService": {
"value": "[variables('workerV2AppServiceName')]"
},
"logAnalyticsWorkspaceId": {
"value": "[resourceId(parameters('logAnalyticsSubscriptionId'),parameters('sharedManagementResourceGroup'),'Microsoft.OperationalInsights/workspaces',parameters('logAnalyticsWorkspaceName'))]"
}
}
},
"dependsOn": [
"[variables('resourceGroupName')]"
]
},
{
"apiVersion": "2021-04-01",
"name": "[concat(variables('workerV2AppServiceName'), '-', parameters('utcValue'))]",
Expand Down Expand Up @@ -329,7 +331,7 @@
},
{
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[parameters('applicationInsightsConnectionString')]"
"value": "[reference(concat(variables('workerV2AppServiceName'), '-application-insights-', parameters('utcValue'))).outputs.ConnectionString.value]"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
Expand Down Expand Up @@ -365,29 +367,31 @@
]
},
{
"condition": "[equals(parameters('enableFailedRequestAlert'), true())]",
"apiVersion": "2021-04-01",
"name": "[concat('application-insights-', variables('workerV2AppServiceName'), '-alert-', parameters('utcValue'))]",
"type": "Microsoft.Resources/deployments",
"name": "[concat(variables('apiV2AppServiceName'), '-application-insights-', parameters('utcValue'))]",
"resourceGroup": "[variables('resourceGroupName')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'),'application-insights-failed-requests-alert.json')]",
"uri": "[concat(variables('deploymentUrlBase'), 'application-insights.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"serviceName": {
"value": "[variables('workerV2AppServiceName')]"
"appInsightsName": {
"value": "[variables('apiV2AppServiceName')]"
},
"applicationInsightsResourceId": {
"value": "[parameters('applicationInsightsResourceId')]"
"attachedService": {
"value": "[variables('apiV2AppServiceName')]"
},
"alertActionGroupResourceId": {
"value": "[parameters('alertActionGroupResourceId')]"
"logAnalyticsWorkspaceId": {
"value": "[resourceId(parameters('logAnalyticsSubscriptionId'),parameters('sharedManagementResourceGroup'),'Microsoft.OperationalInsights/workspaces',parameters('logAnalyticsWorkspaceName'))]"
}
}
}
},
"dependsOn": [
"[variables('resourceGroupName')]"
]
},
{
"apiVersion": "2021-04-01",
Expand Down Expand Up @@ -457,7 +461,7 @@
},
{
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[parameters('applicationInsightsConnectionString')]"
"value": "[reference(concat(variables('apiV2AppServiceName'), '-application-insights-', parameters('utcValue'))).outputs.ConnectionString.value]"
}
]
}
Expand All @@ -478,29 +482,29 @@
]
},
{
"condition": "[equals(parameters('enableFailedRequestAlert'), true())]",
"condition": "[parameters('deploySupportApp')]",
"apiVersion": "2021-04-01",
"name": "[concat('application-insights-', variables('apiV2AppServiceName'), '-alert-', parameters('utcValue'))]",
"type": "Microsoft.Resources/deployments",
"name": "[concat(variables('supportAppServiceName'), '-application-insights-', parameters('utcValue'))]",
"resourceGroup": "[variables('resourceGroupName')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'),'application-insights-failed-requests-alert.json')]",
"uri": "[concat(variables('deploymentUrlBase'), 'application-insights.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"serviceName": {
"value": "[variables('apiV2AppServiceName')]"
},
"applicationInsightsResourceId": {
"value": "[parameters('applicationInsightsResourceId')]"
"appInsightsName": {
"value": "[variables('supportAppServiceName')]"
},
"alertActionGroupResourceId": {
"value": "[parameters('alertActionGroupResourceId')]"
"attachedService": {
"value": "[variables('supportAppServiceName')]"
}
}
}
},
"dependsOn": [
"[variables('resourceGroupName')]"
]
},
{
"condition": "[parameters('deploySupportApp')]",
Expand Down Expand Up @@ -568,7 +572,7 @@
},
{
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[parameters('applicationInsightsConnectionString')]"
"value": "[if(parameters('deploySupportApp'), reference(concat(variables('supportAppServiceName'), '-application-insights-', parameters('utcValue'))).outputs.ConnectionString.value, '')]"
}
]
}
Expand All @@ -588,31 +592,6 @@
"[variables('resourceGroupName')]"
]
},
{
"condition": "[and(equals(parameters('enableFailedRequestAlert'), true()), parameters('deploySupportApp'))]",
"apiVersion": "2021-04-01",
"name": "[concat('application-insights-', variables('supportAppServiceName'), '-alert-', parameters('utcValue'))]",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('resourceGroupName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'),'application-insights-failed-requests-alert.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"serviceName": {
"value": "[variables('supportAppServiceName')]"
},
"applicationInsightsResourceId": {
"value": "[parameters('applicationInsightsResourceId')]"
},
"alertActionGroupResourceId": {
"value": "[parameters('alertActionGroupResourceId')]"
}
}
}
},
{
"apiVersion": "2021-04-01",
"name": "[concat(variables('workerV2AppServiceName'), '-apim-subscription-', parameters('utcValue'))]",
Expand Down Expand Up @@ -789,4 +768,4 @@
"value": "[variables('serviceBusName')]"
}
}
}
}
10 changes: 1 addition & 9 deletions pipeline-templates/job/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ jobs:
ResourceEnvironmentName: $(ResourceEnvironmentName)
UnrestrictedEnvironments: $(UnrestrictedEnvironments)
UptimeMonitoringAccessRestrictions: $(UptimeMonitoringAccessRestrictions)
- template: azure-pipelines-templates/deploy/step/get-product-app-insights.yml@das-platform-building-blocks
parameters:
ServiceConnection: ${{ parameters.ServiceConnection }}
AppInsightsResourceGroup: $(SharedEnvResourceGroup)
AppInsightsName: $(ProductAppInsightsName)
IsMultiRepoCheckout: true
- template: azure-pipelines-templates/deploy/step/arm-deploy.yml@das-platform-building-blocks
parameters:
ServiceConnection: ${{ parameters.ServiceConnection }}
Expand All @@ -47,7 +41,6 @@ jobs:
TemplateSecrets:
ConfigurationStorageConnectionString: $(ConfigurationStorageConnectionString)
SharedStorageAccountConnectionString: $(SharedStorageAccountConnectionString)
ApplicationInsightsConnectionString: $(ApplicationInsightsConnectionString)
- template: azure-pipelines-templates/deploy/step/get-apim-subscription-key.yml@das-platform-building-blocks
parameters:
ServiceConnection: ${{ parameters.ServiceConnection }}
Expand Down Expand Up @@ -121,11 +114,10 @@ jobs:
AppServiceName: $(ApiV2AppServiceName)
DeploymentPackagePath: $(Pipeline.Workspace)/${{ parameters.SolutionBaseName }}/${{ parameters.SolutionBaseName }}V2.Api.zip
- template: azure-pipelines-templates/deploy/step/webjob-deploy.yml@das-platform-building-blocks
parameters:
parameters:
ServiceConnection: ${{ parameters.ServiceConnection }}
AppServiceName: $(WorkerV2AppServiceName)
DeploymentPackagePath: $(Pipeline.Workspace)/${{ parameters.SolutionBaseName }}/${{ parameters.SolutionBaseName }}V2.Host.zip
ResourceGroupName: $(ResourceGroupName)
DeploymentType: zipDeploy
- ${{ if or(eq(parameters.Environment, 'AT'), eq(parameters.Environment, 'TEST'), eq(parameters.Environment, 'PP'), eq(parameters.Environment, 'PROD')) }}:
- template: azure-pipelines-templates/deploy/step/app-deploy.yml@das-platform-building-blocks
Expand Down