-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ny tjeneste skattekort-service
- Loading branch information
Showing
59 changed files
with
2,617 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: skattekort-service | ||
|
||
on: | ||
push: | ||
paths: | ||
- libs/reactive-core | ||
- libs/reactive-security | ||
- libs/security-core | ||
- libs/data-transfer-objects | ||
- apps/skattekort-service/** | ||
- .github/workflows/app.skattekort-service.yml | ||
|
||
jobs: | ||
workflow: | ||
uses: ./.github/workflows/common.workflow.backend.yml | ||
with: | ||
working-directory: "apps/skattekort-service" | ||
deploy-tag: "#deploy-skattekort-service" | ||
permissions: | ||
contents: read | ||
id-token: write | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
||
ENV JAVA_OPTS="-Dspring.profiles.active=prod --add-opens java.base/java.lang=ALL-UNNAMED" | ||
|
||
COPY build/libs/app.jar app.jar | ||
|
||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
layout: default | ||
title: testnav-skattekort-service | ||
parent: Applikasjoner | ||
--- | ||
|
||
# skattekort-service | ||
|
||
Tjeneste for å legge til skattekort i os-eskatt ved innsending til deres eget API for test. | ||
|
||
## Bruk | ||
|
||
Applikasjonen omformer JSON-request til XML-request og sender inn på overnevnte endepunkt. | ||
|
||
|
||
## Lokal kjøring | ||
|
||
Ha naisdevice kjørende og kjør SkattekortServiceApplicationStarter med følgende argumenter: | ||
|
||
``` | ||
--add-opens java.base/java.lang=ALL-UNNAMED | ||
-Dspring.profiles.active=dev | ||
-Dspring.cloud.vault.token=[vault-token] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
plugins { | ||
id 'java' | ||
id "org.sonarqube" version "4.4.1.3373" | ||
id 'org.springframework.boot' version "3.2.1" | ||
id 'io.spring.dependency-management' version "1.1.4" | ||
id "jacoco" | ||
id 'org.unbroken-dome.xjc' version '2.0.0' | ||
} | ||
|
||
sonarqube { | ||
properties { | ||
property "sonar.dynamicAnalysis", "reuseReports" | ||
property "sonar.host.url", "https://sonarcloud.io" | ||
property "sonar.java.coveragePlugin", "jacoco" | ||
property "sonar.language", "java" | ||
property "sonar.token", System.getenv("SONAR_TOKEN") | ||
property "sonar.organization", "navikt" | ||
property "sonar.project.monorepo.enabled", true | ||
property "sonar.projectKey", "testnav-skattekort-service" | ||
property "sonar.projectName", "testnav-skattekort-service" | ||
property "sonar.sourceEncoding", "UTF-8" | ||
} | ||
} | ||
|
||
bootJar { | ||
archiveFileName = "app.jar" | ||
mainClass = 'no.nav.skattekortservice.SkattekortServiceApplicationStarter' | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} | ||
|
||
dependencyManagement { | ||
applyMavenExclusions = false | ||
imports { | ||
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0' | ||
} | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(21) | ||
} | ||
} | ||
|
||
sourceSets { | ||
main { | ||
xjcBinding.srcDirs = ['resources/xjb'] | ||
} | ||
} | ||
|
||
xjc { | ||
xjcVersion = '3.0' | ||
srcDirName = 'resources/schema' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri('https://maven.pkg.github.com/navikt/maven-release') | ||
credentials(PasswordCredentials) { | ||
password System.getenv("NAV_TOKEN") | ||
username 'token' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' | ||
implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.0' | ||
implementation 'org.json:json:20231013' | ||
|
||
implementation 'no.nav.testnav.libs:security-core' | ||
implementation 'no.nav.testnav.libs:reactive-core' | ||
implementation 'no.nav.testnav.libs:reactive-security' | ||
implementation 'no.nav.testnav.libs:data-transfer-objects' | ||
|
||
implementation 'org.springframework.boot:spring-boot-starter-webflux' | ||
implementation 'org.springframework.boot:spring-boot-starter-security' | ||
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' | ||
|
||
implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' | ||
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' | ||
implementation 'org.springframework.boot:spring-boot-starter-actuator' | ||
|
||
implementation 'io.micrometer:micrometer-registry-prometheus' | ||
implementation 'org.hibernate.validator:hibernate-validator' | ||
|
||
implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.3.0' | ||
implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20' | ||
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' | ||
|
||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
|
||
implementation 'ma.glasnost.orika:orika-core:1.5.4' | ||
annotationProcessor 'org.projectlombok:lombok' | ||
implementation 'org.projectlombok:lombok' | ||
|
||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
apiVersion: "nais.io/v1alpha1" | ||
kind: "Application" | ||
metadata: | ||
name: testnav-skattekort-service | ||
namespace: dolly | ||
labels: | ||
team: dolly | ||
spec: | ||
image: "{{image}}" | ||
port: 8080 | ||
webproxy: true | ||
tokenx: | ||
enabled: true | ||
azure: | ||
application: | ||
allowAllUsers: true | ||
enabled: true | ||
tenant: nav.no | ||
accessPolicy: | ||
inbound: | ||
rules: | ||
- application: dolly-backend | ||
- application: dolly-frontend | ||
- application: dolly-idporten | ||
- application: testnav-oversikt-frontend | ||
outbound: | ||
external: | ||
- host: sokos-skattekort-dolly.dev-fss-pub.nais.io | ||
liveness: | ||
path: /internal/isAlive | ||
periodSeconds: 30 | ||
initialDelay: 30 | ||
readiness: | ||
path: /internal/isReady | ||
initialDelay: 30 | ||
prometheus: | ||
enabled: true | ||
path: /internal/metrics | ||
replicas: | ||
min: 1 | ||
max: 1 | ||
vault: | ||
enabled: true | ||
resources: | ||
limits: | ||
memory: 2048Mi | ||
requests: | ||
cpu: 200m | ||
memory: 1024Mi | ||
ingresses: | ||
- "https://testnav-skattekort-service.intern.dev.nav.no" |
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
apps/skattekort-service/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.