Skip to content

Commit

Permalink
chore: enable staging container apps (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
arealmaas authored Feb 14, 2024
1 parent b133f8f commit 424300b
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci-cd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,44 @@ jobs:
environment: staging
region: norwayeast
gitShortSha: ${{ needs.generate-git-short-sha.outputs.gitShortSha }}

dry-run-deploy-apps-staging:
name: Deploy apps to staging
needs: [generate-git-short-sha, check-for-changes, deploy-apps-test]
uses: ./.github/workflows/action-deploy-apps.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# todo: consider resolving these in another way since they are created in the infra-step
AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
AZURE_ADO_CONNECTION_STRING_SECRET_URI: ${{ secrets.AZURE_ADO_CONNECTION_STRING_SECRET_URI }}
AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }}
AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }}
AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }}
AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }}
with:
environment: staging
region: norwayeast
dryRun: true
gitShortSha: ${{ needs.generate-git-short-sha.outputs.gitShortSha }}

deploy-apps-staging:
name: Deploy apps to staging
needs: [generate-git-short-sha, check-for-changes, deploy-apps-test]
uses: ./.github/workflows/action-deploy-apps.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# todo: consider resolving these in another way since they are created in the infra-step
AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
AZURE_ADO_CONNECTION_STRING_SECRET_URI: ${{ secrets.AZURE_ADO_CONNECTION_STRING_SECRET_URI }}
AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }}
AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }}
AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }}
AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }}
with:
environment: staging
region: norwayeast
gitShortSha: ${{ needs.generate-git-short-sha.outputs.gitShortSha }}
59 changes: 59 additions & 0 deletions src/Digdir.Domain.Dialogporten.WebApi/appsettings.staging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"Infrastructure": {
"DialogDbConnectionString": "TODO: Add to local secrets",
// Settings from appsettings.json, environment variables or other configuration providers.
// The first three are always mandatory for all client definitions types
"Maskinporten": {
// 1. Valid values are test and prod
"Environment": "test",

// 2. Client Id/integration as configured in Maskinporten
"ClientId": "TODO: Add to local secrets",

// 3. Scope(s) requested, space seperated. Must be provisioned on supplied client id.
"Scope": "altinn:events.publish altinn:events.publish.admin",

// --------------------------
// Any additional settings are specific for the selected client definition type.
// See below for examples using other types.
"EncodedJwk": "TODO: Add to local secrets"
},
"Altinn": {
"BaseUri": "https://platform.tt02.altinn.no/",
"SubscriptionKey": "TODO: Add to local secrets"
}
},
"Application": {
"Dialogporten": {
"BaseUri": "https://dp-be-staging-webapi-so-ca.wittyriver-15a3cfc3.norwayeast.azurecontainerapps.io"
}
},
"WebApi": {
"Authentication": {
"JwtBearerTokenSchemas": [
{
"Name": "Maskinporten",
"WellKnown": "https://test.maskinporten.no/.well-known/oauth-authorization-server/"
},
{
"Name": "MaskinportenAuxiliary",
"WellKnown": "https://ver2.maskinporten.no/.well-known/oauth-authorization-server/"
},
{
"Name": "Altinn",
"WellKnown": "https://platform.tt02.altinn.no/authentication/api/v1/openid/.well-known/openid-configuration"
},
{
"Name": "Idporten",
"WellKnown": "https://test.idporten.no/.well-known/openid-configuration"
}
]
}
}
}

0 comments on commit 424300b

Please sign in to comment.