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

Add new oppdrag-service application #3498

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8732b81
Add new oppdrag-service application
krharum May 28, 2024
35be286
Add Oppdrag web service client and update configurations
krharum May 28, 2024
2cf8f24
Add OppdragRequest DTO class
krharum May 28, 2024
d2f6105
Merge branch 'master' into feature/oppdrag-service
krharum Oct 14, 2024
1ae4acc
**Refactor project structure and dependencies**
krharum Oct 15, 2024
03b7b16
Add Oppdrag service layer implementation
krharum Oct 15, 2024
21b3d9b
Refactor OppdragRequest: Change String to KodeEndring enum
krharum Oct 15, 2024
ca4fbdc
Merge branch 'master' into feature/oppdrag-service
krharum Oct 29, 2024
bd567a1
Add mapping strategy and Swagger adjustments
krharum Oct 30, 2024
83ee526
Enhance DTO schemas and validation
krharum Oct 30, 2024
2099800
Add custom mappings for LocalDate and LocalDateTime
krharum Oct 31, 2024
7d1b54d
Add TestConfig and Oppdragsdata utility classes
krharum Nov 1, 2024
01276b7
Refactor OppdragService to use new OppdragResponse DTO
krharum Nov 1, 2024
72c562c
Add missing fields to Oppdragsdata and update tests.
krharum Nov 1, 2024
b99ccea
Add oppdrag-service GitHub Actions workflow
krharum Nov 1, 2024
27257c0
Update Oppdragsdata.java and Dockerfile #deploy-oppdrag-service
krharum Nov 1, 2024
ad7f2ec
Refactor date and time initialization logic.
krharum Nov 4, 2024
08bac2d
Refactor Oppdrag components.
krharum Nov 4, 2024
810bea3
Refactor Dockerfile and cleanup code
krharum Nov 4, 2024
3d9565d
Fix main class path in build.gradle
krharum Nov 4, 2024
6f9bae6
Initialize oppdrag-proxy project structure
krharum Nov 5, 2024
c814b41
Add Spring Cloud starter bootstrap dependency
krharum Nov 5, 2024
b422f93
Remove unused dependencies and test properties file
krharum Nov 5, 2024
711bc51
Disable vault in config
krharum Nov 6, 2024
713b43f
Refactor OppdragService to use WebClient
krharum Nov 6, 2024
978776a
Set cluster to "dev-fss" in workflow
krharum Nov 6, 2024
0ef42fe
Remove vault configuration from config.yml
krharum Nov 6, 2024
a365043
Change workflow name to oppdrag-service
krharum Nov 6, 2024
4b0c7be
Add cluster configuration for inbound rules in config.yml #deploy-opp…
krharum Nov 6, 2024
db1a6c0
Remove Reactor Mono from OppdragService
krharum Nov 7, 2024
4bea706
Handle SendInnOppdragFeilUnderBehandling exception
krharum Nov 7, 2024
23ec4e9
Remove redundant SoapActionCallback.
krharum Nov 7, 2024
07bc5ff
Handle SoapFaultClientException in OppdragWSConsumer
krharum Nov 7, 2024
8c6b7e5
Update error logging for SOAP faults in OppdragWSConsumer #deploy-opp…
krharum Nov 7, 2024
ce89fc7
Update error logging for SOAP faults in OppdragWSConsumer #deploy-opp…
krharum Nov 7, 2024
176e9f6
Improve SOAP fault detail logging
krharum Nov 7, 2024
9f3c2e6
Refactor SoapFaultDetailElement processing logic
krharum Nov 7, 2024
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
23 changes: 23 additions & 0 deletions .github/workflows/app.oppdrag-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: oppdrag-service

on:
push:
paths:
- "plugins/**"
- "libs/data-transfer-objects/**"
- "libs/servlet-core/**"
- "libs/servlet-security/**"
- "apps/oppdrag-service/**"
- ".github/workflows/app.oppdrag-service.yml"

jobs:
workflow:
uses: ./.github/workflows/common.workflow.backend.yml
with:
cluster: "dev-fss"
working-directory: "apps/oppdrag-service"
deploy-tag: "#deploy-oppdrag-service"
permissions:
contents: read
id-token: write
secrets: inherit
24 changes: 24 additions & 0 deletions .github/workflows/proxy.oppdrag-proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: oppdrag-proxy

on:
push:
paths:
- "plugins/**"
- "libs/reactive-core/**"
- "libs/reactive-proxy/**"
- "libs/reactive-security/**"
- "libs/security-core/**"
- "proxies/oppdrag-proxy/**"
- ".github/workflows/proxy.oppdrag-proxy.yml"

jobs:
workflow:
uses: ./.github/workflows/common.workflow.backend.yml
with:
cluster: "dev-fss"
working-directory: "proxies/oppdrag-proxy"
deploy-tag: "#deploy-proxy-oppdrag"
permissions:
contents: read
id-token: write
secrets: inherit
8 changes: 8 additions & 0 deletions apps/oppdrag-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ghcr.io/navikt/baseimages/temurin:21
LABEL maintainer="Team Dolly"

COPY /build/libs/app.jar /app/app.jar

ENV JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED -Dspring.profiles.active=prod"

EXPOSE 8080
19 changes: 19 additions & 0 deletions apps/oppdrag-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Oppdrag-service
App for å sende til oppdragssystemet.

## Swagger
Swagger finnes under [/swagger](https://miljoer-service.intern.dev.nav.no/swagger) -endepunktet til applikasjonen.

## Lokal kjøring
Ha naisdevice kjørende og kjør OppdragServiceApplicationStarter med følgende argumenter:
```
-Dspring.cloud.vault.token=[vault-token]
-Dspring.profiles.active=dev
```

### Utviklerimage
I utviklerimage brukes ikke naisdevice og du må legge til følgende ekstra argumenter:
```
-Djavax.net.ssl.trustStore=[path til lokal truststore]
-Djavax.net.ssl.trustStorePassword=[passord til lokal truststore]
```
68 changes: 68 additions & 0 deletions apps/oppdrag-service/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "uk.co.boothen.gradle:gradle-wsimport:0.21"
}
}

plugins {
id 'dolly-apps'
id "uk.co.boothen.gradle.wsimport" version "0.21"
}

apply plugin: "uk.co.boothen.gradle.wsimport"

sonarqube {
properties {
property "sonar.projectKey", "testnav-oppdrag-service"
property "sonar.projectName", "testnav-oppdrag-service"
}
}

wsimport {
wsdlSourceRoot = "src/main/resources/schema/eksponering"
generatedSourceRoot = "/generated/src/wsdl/main"
generatedClassesRoot = "/classes/main"
wsdl("oppdragServiceWSBinding.wsdl") {
packageName = "no.nav.testnav.oppdragservice.wsdl"
xjcarg("-XautoNameResolution")
}
verbose = true
debug = true
target = "3.0"
}

configurations {
jaxws
}

dependencies {
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.0'

jaxws 'com.sun.xml.ws:jaxws-tools:3.0.0',
'jakarta.xml.ws:jakarta.xml.ws-api:3.0.0',
'jakarta.xml.bind:jakarta.xml.bind-api:3.0.0',
'jakarta.activation:jakarta.activation-api:2.0.0',
'com.sun.xml.ws:jaxws-rt:3.0.0'

implementation "no.nav.testnav.libs:data-transfer-objects"
implementation "no.nav.testnav.libs:security-core"
implementation "no.nav.testnav.libs:servlet-core"
implementation "no.nav.testnav.libs:servlet-security"
implementation "no.nav.testnav.libs:vault"

implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-security"
implementation "org.springframework.boot:spring-boot-starter-oauth2-client"
implementation "org.springframework.boot:spring-boot-starter-web-services"

implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc"
implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger"

implementation "ma.glasnost.orika:orika-core:$versions.orika"
}
60 changes: 60 additions & 0 deletions apps/oppdrag-service/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: "nais.io/v1alpha1"
kind: "Application"
metadata:
name: testnav-oppdrag-service
namespace: dolly
labels:
team: dolly
spec:
image: "{{image}}"
port: 8080
webproxy: true
accessPolicy:
inbound:
rules:
- application: dolly-backend
cluster: dev-gcp
- application: dolly-backend-dev
cluster: dev-gcp
- application: dolly-frontend
cluster: dev-gcp
- application: dolly-frontend-dev
cluster: dev-gcp
- application: dolly-frontend-dev-unstable
cluster: dev-gcp
- application: dolly-idporten
cluster: dev-gcp
- application: team-dolly-lokal-app
cluster: dev-gcp
- application: testnav-oversikt-frontend
cluster: dev-gcp
tokenx:
enabled: true
azure:
application:
allowAllUsers: true
enabled: true
tenant: nav.no
liveness:
path: /internal/isAlive
initialDelay: 30
periodSeconds: 30
failureThreshold: 500
readiness:
path: /internal/isReady
initialDelay: 30
failureThreshold: 500
prometheus:
enabled: true
path: /internal/metrics
replicas:
min: 1
max: 1
resources:
requests:
cpu: 100m
memory: 1024Mi
limits:
memory: 2048Mi
ingresses:
- "https://testnav-oppdrag-service.intern.dev.nav.no"
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading