Skip to content

Commit

Permalink
10hr
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad committed Feb 28, 2025
1 parent 7b80aa8 commit 74a7329
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .azure/applications/web-api-migration-job/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ param containerAppEnvironmentName string
@secure()
param environmentKeyVaultName string

@description('The replica timeout for the job in seconds')
param replicaTimeOutInSeconds int

var namePrefix = 'dp-be-${environment}'
var baseImageUrl = 'ghcr.io/altinn/dialogporten-'
var tags = {
Expand Down Expand Up @@ -73,6 +76,7 @@ module migrationJob '../../modules/containerAppJob/main.bicep' = {
secrets: secrets
tags: tags
userAssignedIdentityId: managedIdentity.id
replicaTimeOutInSeconds: replicaTimeOutInSeconds
}
}

Expand Down
1 change: 1 addition & 0 deletions .azure/applications/web-api-migration-job/prod.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using './main.bicep'
param environment = 'prod'
param location = 'norwayeast'
param imageTag = readEnvironmentVariable('IMAGE_TAG')
param replicaTimeOutInSeconds = 36000

//secrets
param containerAppEnvironmentName = readEnvironmentVariable('AZURE_CONTAINER_APP_ENVIRONMENT_NAME')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using './main.bicep'
param environment = 'staging'
param location = 'norwayeast'
param imageTag = readEnvironmentVariable('IMAGE_TAG')
param replicaTimeOutInSeconds = 36000

//secrets
param containerAppEnvironmentName = readEnvironmentVariable('AZURE_CONTAINER_APP_ENVIRONMENT_NAME')
Expand Down
1 change: 1 addition & 0 deletions .azure/applications/web-api-migration-job/test.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using './main.bicep'
param environment = 'test'
param location = 'norwayeast'
param imageTag = readEnvironmentVariable('IMAGE_TAG')
param replicaTimeOutInSeconds = 36000

//secrets
param containerAppEnvironmentName = readEnvironmentVariable('AZURE_CONTAINER_APP_ENVIRONMENT_NAME')
Expand Down
1 change: 1 addition & 0 deletions .azure/applications/web-api-migration-job/yt01.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using './main.bicep'
param environment = 'yt01'
param location = 'norwayeast'
param imageTag = readEnvironmentVariable('IMAGE_TAG')
param replicaTimeOutInSeconds = 36000

//secrets
param containerAppEnvironmentName = readEnvironmentVariable('AZURE_CONTAINER_APP_ENVIRONMENT_NAME')
Expand Down
5 changes: 4 additions & 1 deletion .azure/modules/containerAppJob/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ param args string = ''
@minLength(1)
param userAssignedIdentityId string

@description('The replica timeout for the job in seconds')
param replicaTimeOutInSeconds int

var isScheduled = !empty(cronExpression)

var scheduledJobProperties = {
Expand Down Expand Up @@ -64,7 +67,7 @@ resource job 'Microsoft.App/jobs@2024-03-01' = {
{
secrets: secrets
replicaRetryLimit: 1
replicaTimeout: 120
replicaTimeout: replicaTimeOutInSeconds
},
isScheduled ? scheduledJobProperties : manualJobProperties
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <auto-generated />
// <auto-generated />
using System;
using Digdir.Domain.Dialogporten.Infrastructure.Persistence;
using Microsoft.EntityFrameworkCore;
Expand Down

0 comments on commit 74a7329

Please sign in to comment.