Skip to content

Commit 79bb31b

Browse files
committed
Skall for app for aggregering av opplysninger om arbeidssøker
1 parent 9423699 commit 79bb31b

File tree

56 files changed

+1640
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1640
-27
lines changed

.github/workflows/api-start-stopp.yml

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
name: Api Start stopp
22
on:
3-
push:
4-
paths:
5-
- 'apps/api-start-stopp-perioder/**'
6-
- 'domain/**'
7-
- 'lib/**'
8-
- '.github/workflows/api-start-stopp.yml'
9-
- 'gradle/**'
10-
- 'settings.gradle.kts'
11-
- 'gradle.properties'
12-
- 'gradlew'
3+
push:
4+
branches:
5+
- main
6+
- dev/*
7+
paths:
8+
- 'apps/api-start-stopp-perioder/**'
9+
- 'domain/**'
10+
- 'lib/**'
11+
- '.github/workflows/api-start-stopp.yml'
12+
- 'gradle/**'
13+
- 'settings.gradle.kts'
14+
- 'gradle.properties'
15+
- 'gradlew'
1316

1417
env:
1518
IMAGE: europe-north1-docker.pkg.dev/${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}/paw/paw-arbeidssokerregisteret-api-inngang
@@ -50,7 +53,9 @@ jobs:
5053
uses: nais/[email protected]
5154
with:
5255
image_ref: ${{ env.IMAGE }}@${{ env.DIGEST }}
56+
5357
deploy-dev:
58+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/dev')
5459
name: Deploy to dev-gcp - API Start Stopp
5560
needs: build
5661
runs-on: ubuntu-latest
@@ -64,10 +69,11 @@ jobs:
6469
CLUSTER: dev-gcp
6570
RESOURCE: apps/api-start-stopp-perioder/nais/nais-dev.yaml
6671
VAR: image=${{ needs.build.outputs.image }}
72+
6773
deploy-prod:
6874
if: github.ref == 'refs/heads/main'
6975
name: Deploy to prod-gcp - API Start Stopp
70-
needs: [build, deploy-dev]
76+
needs: [ build, deploy-dev ]
7177
runs-on: ubuntu-latest
7278
permissions:
7379
contents: read

.github/workflows/hendelselogg-backup.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Hendelselogg-backup
22

33
on:
44
push:
5+
branches:
6+
- main
7+
- dev/*
58
paths:
69
- 'apps/hendelselogg-backup/**'
710
- 'lib/**'
@@ -11,6 +14,7 @@ on:
1114
- 'settings.gradle.kts'
1215
- 'gradle.properties'
1316
- 'gradlew'
17+
1418
env:
1519
IMAGE: europe-north1-docker.pkg.dev/${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}/paw/paw-arbeidssoekerregisteret-hendelselogg-backup
1620
jobs:
@@ -53,6 +57,7 @@ jobs:
5357
image_ref: ${{ env.IMAGE }}@${{ env.DIGEST }}
5458

5559
deploy-dev:
60+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/dev')
5661
name: Deploy to dev-gcp
5762
needs: build
5863
runs-on: ubuntu-latest
@@ -70,7 +75,7 @@ jobs:
7075
deploy-prod:
7176
if: github.ref == 'refs/heads/main'
7277
name: Deploy to prod-gcp
73-
needs: [build, deploy-dev]
78+
needs: [ build, deploy-dev ]
7479
runs-on: ubuntu-latest
7580
permissions:
7681
contents: read

.github/workflows/hendelseprosessor.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Hendelseprosessor
22

33
on:
44
push:
5+
branches:
6+
- main
7+
- dev/*
58
paths:
69
- 'apps/hendelseprosessor/**'
710
- 'lib/**'
@@ -11,6 +14,7 @@ on:
1114
- 'settings.gradle.kts'
1215
- 'gradle.properties'
1316
- 'gradlew'
17+
1418
env:
1519
IMAGE: europe-north1-docker.pkg.dev/${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}/paw/paw-arbeidssokerregisteret-event-prosessor
1620
jobs:
@@ -51,7 +55,9 @@ jobs:
5155
uses: nais/[email protected]
5256
with:
5357
image_ref: ${{ env.IMAGE }}@${{ env.DIGEST }}
58+
5459
deploy-dev:
60+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/dev')
5561
name: Deploy to dev-gcp
5662
needs: build
5763
runs-on: ubuntu-latest
@@ -69,7 +75,7 @@ jobs:
6975
deploy-prod:
7076
if: github.ref == 'refs/heads/main'
7177
name: Deploy to prod-gcp
72-
needs: [build, deploy-dev]
78+
needs: [ build, deploy-dev ]
7379
runs-on: ubuntu-latest
7480
permissions:
7581
contents: read
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Build, push, and deploy - paw-arbeidssoeker-opplysninger-aggregering
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev/*
8+
paths:
9+
- 'apps/opplysninger-aggregering/**'
10+
- 'lib/**'
11+
- 'domain/**'
12+
- '.github/workflows/opplysninger-aggregering.yaml'
13+
- 'gradle/**'
14+
- 'settings.gradle.kts'
15+
- 'gradle.properties'
16+
- 'gradlew'
17+
18+
env:
19+
IMAGE: europe-north1-docker.pkg.dev/${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}/paw/paw-arbeidssoeker-opplysninger-aggregering
20+
jobs:
21+
build:
22+
name: Build and push Docker container
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
id-token: write
27+
packages: write
28+
outputs:
29+
image: ${{ steps.docker-build-push.outputs.image }}
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
- name: Setup Java
34+
uses: actions/setup-java@v3
35+
with:
36+
java-version: 21
37+
distribution: temurin
38+
cache: gradle
39+
- name: Specify module
40+
run: echo "MODULE=:apps:opplysninger-aggregering" >> $GITHUB_ENV
41+
- name: Specify version
42+
run: echo "VERSION=$(date +'%y.%m.%d').${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
43+
- name: Login GAR
44+
uses: nais/login@v0
45+
with:
46+
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
47+
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
48+
team: paw
49+
- name: Build with Gradle
50+
id: docker-build-push
51+
working-directory: ./
52+
run: |
53+
echo "image=${{ env.IMAGE }}:${{ env.VERSION }}" >> $GITHUB_OUTPUT
54+
./gradlew -Pversion=${{ env.VERSION }} -Pimage=${{ env.IMAGE }} ${{ env.MODULE }}:build ${{ env.MODULE }}:test ${{ env.MODULE }}:jib
55+
echo "DIGEST=$(cat ./apps/opplysninger-aggregering/build/jib-image.digest)" >> $GITHUB_ENV
56+
env:
57+
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
58+
- name: Attest and sign
59+
uses: nais/[email protected]
60+
with:
61+
image_ref: ${{ env.IMAGE }}@${{ env.DIGEST }}
62+
63+
deploy-dev:
64+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/dev')
65+
name: Deploy to dev-gcp
66+
needs: build
67+
runs-on: ubuntu-latest
68+
permissions:
69+
contents: read
70+
id-token: write
71+
steps:
72+
- name: Checkout
73+
uses: actions/checkout@v3
74+
- name: Deploy
75+
uses: nais/deploy/actions/deploy@v2
76+
env:
77+
CLUSTER: dev-gcp
78+
RESOURCE: ./apps/opplysninger-aggregering/nais/nais-dev.yaml
79+
VAR: image=${{ needs.build.outputs.image }},kafka=nav-dev
80+
81+
deploy-prod:
82+
if: github.ref == 'refs/heads/main'
83+
name: Deploy to prod-gcp
84+
needs: [build, deploy-dev]
85+
runs-on: ubuntu-latest
86+
permissions:
87+
contents: read
88+
id-token: write
89+
steps:
90+
- name: Checkout
91+
uses: actions/checkout@v3
92+
- name: Deploy
93+
uses: nais/deploy/actions/deploy@v2
94+
env:
95+
TEAM: paw
96+
CLUSTER: prod-gcp
97+
RESOURCE: ./apps/opplysninger-aggregering/nais/nais-prod.yaml
98+
VAR: image=${{ needs.build.outputs.image }},kafka=nav-prod

.github/workflows/utgang-formidlingsgruppe-deploy.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Formidlingsgruppe - Utgang
22

33
on:
44
push:
5+
branches:
6+
- main
7+
- dev/*
58
paths:
69
- 'apps/utgang-formidlingsgruppe/**'
710
- 'lib/**'
@@ -55,7 +58,9 @@ jobs:
5558
uses: nais/[email protected]
5659
with:
5760
image_ref: ${{ env.IMAGE }}@${{ env.DIGEST }}
61+
5862
deploy-dev:
63+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/dev')
5964
name: Deploy to dev-gcp
6065
permissions:
6166
contents: read
@@ -69,13 +74,14 @@ jobs:
6974
CLUSTER: dev-gcp
7075
RESOURCE: apps/utgang-formidlingsgruppe/nais/nais-dev.yaml
7176
VAR: image=${{ needs.build.outputs.image }},kafka=nav-dev
77+
7278
deploy-prod:
7379
if: github.ref == 'refs/heads/main'
7480
name: Deploy to prod-gcp
7581
permissions:
7682
contents: read
7783
id-token: write
78-
needs: [deploy-dev,build]
84+
needs: [ deploy-dev,build ]
7985
runs-on: ubuntu-latest
8086
steps:
8187
- uses: actions/checkout@v3

.github/workflows/utgang-pdl-deploy.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: PDL - Utgang
22

33
on:
44
push:
5+
branches:
6+
- main
7+
- dev/*
58
paths:
69
- 'apps/utgang-pdl/**'
710
- '.github/workflows/utgang-pdl-deploy.yaml'
@@ -55,7 +58,9 @@ jobs:
5558
uses: nais/[email protected]
5659
with:
5760
image_ref: ${{ env.IMAGE }}@${{ env.DIGEST }}
61+
5862
deploy-dev:
63+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/dev')
5964
name: Deploy to dev-gcp
6065
permissions:
6166
contents: read
@@ -69,6 +74,7 @@ jobs:
6974
CLUSTER: dev-gcp
7075
RESOURCE: apps/utgang-pdl/nais/nais-dev.yaml
7176
VAR: image=${{ needs.build.outputs.image }},kafka=nav-dev
77+
7278
deploy-prod:
7379
if: github.ref == 'refs/heads/main'
7480
name: Deploy to prod-gcp
@@ -83,4 +89,4 @@ jobs:
8389
env:
8490
CLUSTER: prod-gcp
8591
RESOURCE: apps/utgang-pdl/nais/nais-prod.yaml
86-
VAR: image=${{ needs.build.outputs.image }},kafka=nav-prod
92+
VAR: image=${{ needs.build.outputs.image }},kafka=nav-prod

apps/hendelselogg-backup/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/backup/brukerstoette/HttpClients.kt

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
package no.nav.paw.arbeidssoekerregisteret.backup.brukerstoette
22

3-
import com.fasterxml.jackson.databind.SerializationFeature
43
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
54
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
6-
import io.ktor.client.*
7-
import io.ktor.client.plugins.contentnegotiation.*
8-
import io.ktor.serialization.jackson.*
5+
import io.ktor.client.HttpClient
6+
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
7+
import io.ktor.serialization.jackson.jackson
98
import no.nav.common.token_client.client.AzureAdMachineToMachineTokenClient
9+
import no.nav.paw.config.env.currentNaisEnv
1010
import no.nav.paw.config.hoplite.loadNaisOrLocalConfiguration
1111
import no.nav.paw.kafkakeygenerator.auth.AzureM2MConfig
1212
import no.nav.paw.kafkakeygenerator.auth.azureAdM2MTokenClient
13-
import no.nav.paw.kafkakeygenerator.auth.currentNaisEnv
1413
import no.nav.paw.kafkakeygenerator.client.KafkaKeysClient
1514
import no.nav.paw.kafkakeygenerator.client.createKafkaKeyGeneratorClient
1615

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# PAW Arbeidssoeker Opplysninger Aggregering
2+

0 commit comments

Comments
 (0)