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

Feature/add exception handling #562

Merged
merged 9 commits into from
Nov 1, 2024
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
6 changes: 6 additions & 0 deletions .azure/infrastructure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ param maskinportenJwk string
param maskinportenClientId string
@secure()
param platformSubscriptionKey string
@secure()
param slackUrl string

import { Sku as KeyVaultSku } from '../modules/keyvault/create.bicep'
param keyVaultSku KeyVaultSku
Expand All @@ -43,6 +45,10 @@ var secrets = [
name: 'platform-subscription-key'
value: platformSubscriptionKey
}
{
name: 'slack-url'
value: slackUrl
}
]

// Create resource groups
Expand Down
1 change: 1 addition & 0 deletions .azure/infrastructure/params.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ param migrationsStorageAccountName = readEnvironmentVariable('MIGRATION_STORAGE_
param maskinportenJwk = readEnvironmentVariable('MASKINPORTEN_JWK')
param maskinportenClientId = readEnvironmentVariable('MASKINPORTEN_CLIENT_ID')
param platformSubscriptionKey = readEnvironmentVariable('PLATFORM_SUBSCRIPTION_KEY')
param slackUrl = readEnvironmentVariable('SLACK_URL')

// SKUs
param keyVaultSku = {
Expand Down
6 changes: 6 additions & 0 deletions .azure/modules/containerApp/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var containerAppEnvVars = [
value: 'true'
}
{ name: 'MaskinportenSettings__EncodedJwk', secretRef: 'maskinporten-jwk' }
{ name: 'GeneralSettings__SlackUrl', secretRef: 'slack-url' }
]
resource containerApp 'Microsoft.App/containerApps@2024-03-01' = {
name: '${namePrefix}-app'
Expand Down Expand Up @@ -97,6 +98,11 @@ resource containerApp 'Microsoft.App/containerApps@2024-03-01' = {
keyVaultUrl: '${keyVaultUrl}/secrets/application-insights-connection-string'
name: 'application-insights-connection-string'
}
{
identity: principal_id
keyVaultUrl: '${keyVaultUrl}/secrets/slack-url'
name: 'slack-url'
}
]
}

Expand Down
4 changes: 4 additions & 0 deletions .github/actions/update-infrastructure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ inputs:
PLATFORM_SUBSCRIPTION_KEY:
description: "Subscription key for platform"
required: true
SLACK_URL:
description: "Email for Slack channel to post to"
mSunberg marked this conversation as resolved.
Show resolved Hide resolved
required: true


runs:
Expand Down Expand Up @@ -83,6 +86,7 @@ runs:
MASKINPORTEN_JWK: ${{ inputs.MASKINPORTEN_JWK }}
MASKINPORTEN_CLIENT_ID: ${{ inputs.MASKINPORTEN_CLIENT_ID }}
PLATFORM_SUBSCRIPTION_KEY: ${{ inputs.PLATFORM_SUBSCRIPTION_KEY }}
SLACK_URL: ${{ inputs.SLACK_URL }}
with:
scope: subscription
template: ./.azure/infrastructure/main.bicep
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-to-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
MASKINPORTEN_JWK: ${{ secrets.MASKINPORTEN_JWK }}
MASKINPORTEN_CLIENT_ID: ${{ secrets.MASKINPORTEN_CLIENT_ID }}
PLATFORM_SUBSCRIPTION_KEY: ${{ secrets.PLATFORM_SUBSCRIPTION_KEY }}
SLACK_URL: ${{ secrets.SLACK_URL }}

- name: Migrate database
uses: ./.github/actions/migrate-database
Expand Down
Loading