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

budpro #3307

Merged
merged 55 commits into from
Oct 9, 2023
Merged

budpro #3307

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
d31a80a
Rammeverk for videre arbeid.
rfc3092 Jul 31, 2023
1c1fc4b
Merge branch 'master' into budpro
rfc3092 Aug 28, 2023
557f773
Endret BudproRecord basert på tilbakemelding.
rfc3092 Sep 19, 2023
2b16b04
Lagt til controller for genererte navn.
rfc3092 Sep 19, 2023
e9d1c72
Build script.
rfc3092 Sep 19, 2023
dbb40f8
Støtte for (optional) seed videre til generer-navn-service.
rfc3092 Sep 19, 2023
b6855d1
Tweak for seed; genererer nå med random navn.
rfc3092 Sep 19, 2023
3e723a7
Lagt til manglende permissions.
rfc3092 Sep 19, 2023
f966978
Merge branch 'master' into budpro
rfc3092 Sep 19, 2023
e7abfbf
Endret til executable.
rfc3092 Sep 19, 2023
53fbd1e
Fikset manglende includeBuild i settings.gradle.
rfc3092 Sep 21, 2023
e45674f
Manglet gradle-wrapper.*...
rfc3092 Sep 21, 2023
4593e71
Bruker samme versjon av plugin com.gradle.enterprise som ellers.
rfc3092 Sep 21, 2023
6ee0b3b
Rettet feilende test.
rfc3092 Oct 2, 2023
624dc2a
La til manglende bootstrap.yml.
rfc3092 Oct 2, 2023
dfb7573
Lagt til støtte for 1 unik leder per 10 genererte ansatte.
rfc3092 Oct 2, 2023
36e51d2
La til JaCoCo plugin.
rfc3092 Oct 2, 2023
02e09c1
Lagt til støtte for (skatte-)kommune.
rfc3092 Oct 2, 2023
f228b83
Lagt til Sonar-plugin.
rfc3092 Oct 2, 2023
fba88db
Slår av Sonar midlertidig.
rfc3092 Oct 2, 2023
39d425c
Lagt til permissions.
rfc3092 Oct 2, 2023
4946ad2
Lagt til permissions.
rfc3092 Oct 2, 2023
14c1f7b
Endrer FROM fra autogenerert verdi.
rfc3092 Oct 2, 2023
5e5f263
Erstatter hele autogenererte Dockerfile...
rfc3092 Oct 2, 2023
8b0cfe3
yaml != yml
rfc3092 Oct 2, 2023
9d550b3
Lagt til NAIS-vennlig config for logger.
rfc3092 Oct 3, 2023
9cfdd45
La til manglende dependency på logstash-logback-encoder.
rfc3092 Oct 3, 2023
4806f2a
Tweak på NAIS-manifest.
rfc3092 Oct 3, 2023
3a647fa
Øker initialDelay pga. tidlig restart og treg oppstart.
rfc3092 Oct 3, 2023
f0cc285
Slår av health check på Vault.
rfc3092 Oct 3, 2023
0e92243
Fjerner deprecated bootstrap.yml.
rfc3092 Oct 3, 2023
42b9ddb
Støtte for stilling.
rfc3092 Oct 3, 2023
4662882
Konfigurerbar toggle for sikkerhet på API.
rfc3092 Oct 3, 2023
b6d251b
Controller for å liste ut alle kjente kommuner.
rfc3092 Oct 3, 2023
4122906
Fjernet GeneratedNameController brukt for testing.
rfc3092 Oct 3, 2023
08f0396
README med kildehenvisninger.
rfc3092 Oct 3, 2023
2f4e996
Redusert initialDelay igjen.
rfc3092 Oct 3, 2023
649f9bc
Støtte for overrides.
rfc3092 Oct 3, 2023
62a32ef
Merge branch 'master' into budpro
rfc3092 Oct 4, 2023
8545b4d
Endret applikasjonsnavn og -ingress til testnav-budpro-service.
rfc3092 Oct 6, 2023
c4a7d3c
Slettet ubrukt kode og endret pakkenavn.
rfc3092 Oct 6, 2023
7106c04
Støtte for organisasjonsenhet.
rfc3092 Oct 6, 2023
60b95ef
Lagt til tilDato.
rfc3092 Oct 6, 2023
5822a5f
La til inbound rule for testnav-dollystatus.
rfc3092 Oct 6, 2023
8fa8c6f
Lagt til TokenX.
rfc3092 Oct 6, 2023
92f15ff
Rettet URL for generer-navn-service.
rfc3092 Oct 6, 2023
f75bf43
Rettet URLer.
rfc3092 Oct 6, 2023
1bd22f0
Lagt til manglende Azure-config i NAIS-manifest.
rfc3092 Oct 6, 2023
e9b5bac
Bruker short name service discovery til generer-navn-service.
rfc3092 Oct 6, 2023
75d1443
Forenkler ServerProperties med defaults for namespace og cluster.
rfc3092 Oct 6, 2023
393e441
Runder av årslønn til hundrelapper.
rfc3092 Oct 6, 2023
46e5b57
Lei av warnings.
rfc3092 Oct 6, 2023
7f6db2a
Lagt til noen tester.
rfc3092 Oct 6, 2023
56ca8d7
Slår på Sonar scan.
rfc3092 Oct 6, 2023
4d4726f
Merge branch 'master' into budpro
rfc3092 Oct 6, 2023
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
4 changes: 4 additions & 0 deletions .github/workflows/all.workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ on:
description: "Deploy to test? Make sure the effective working directory contains a config.test.yml! Note: For dolly-frontend, this will also deploy with config.unstable.yml."
default: false

permissions:
contents: read
id-token: write

jobs:

start:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/app.budpro-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: budpro-service

on:
push:
paths:
- libs/commands
- libs/data-transfer-objects
- libs/reactive-core
- libs/security-core
- libs/servlet-core
- libs/servlet-insecure-security
- libs/servlet-security
- apps/budpro-service/**
- .github/workflows/app.budpro-service.yml

jobs:
workflow:
uses: ./.github/workflows/common.workflow.backend.yml
with:
working-directory: "apps/budpro-service"
deploy-tag: "#deploy-budpro-service"
permissions:
contents: read
id-token: write
secrets:
NAIS_DOLLY_DEPLOY_API_KEY: ${{ secrets.NAIS_DOLLY_DEPLOY_API_KEY }}
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3 changes: 3 additions & 0 deletions .github/workflows/common.workflow.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jobs:
needs: start
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down
37 changes: 37 additions & 0 deletions apps/budpro-service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
8 changes: 8 additions & 0 deletions apps/budpro-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ghcr.io/navikt/baseimages/temurin:17
LABEL maintainer="Team Dolly"

ADD build/libs/app.jar /app/app.jar

ENV JAVA_OPTS="-Dspring.profiles.active=prod"

EXPOSE 8080
10 changes: 10 additions & 0 deletions apps/budpro-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**Kilder:**

*Kommuner:*
> https://www.ssb.no/klass/klassifikasjoner/131

*Stillinger:
> https://www.ssb.no/arbeid-og-lonn/sysselsetting/artikler/yrkeskatalogen

*Organisasjonsenhet:*
> https://confluence.adeo.no/display/PK/PK-6917?preview=%2F68215567%2F101614076%2FHR+ORGANISASJONSSTRUKTUR2.xls
103 changes: 103 additions & 0 deletions apps/budpro-service/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.2'
id 'io.spring.dependency-management' version '1.1.2'
id "jacoco"
id "org.sonarqube" version "4.0.0.2929"
}

java {
sourceCompatibility = '17'
}

bootJar {
archiveFileName = "app.jar"
mainClass = 'no.nav.dolly.budpro.BudproServiceApplication'
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
mavenLocal()
maven {
name = "GitHubPackages"
url = uri('https://maven.pkg.github.com/navikt/maven-release')
credentials(PasswordCredentials) {
username 'token'
password System.getenv("NAV_TOKEN")
}
}
}

dependencyManagement {
applyMavenExclusions = false
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:2022.0.4"
}
}

dependencies {
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'

compileOnly 'org.projectlombok:lombok'

developmentOnly 'org.springframework.boot:spring-boot-devtools'

implementation 'net.logstash.logback:logstash-logback-encoder:7.4'
implementation 'no.nav.testnav.libs:commands'
implementation 'no.nav.testnav.libs:data-transfer-objects'
implementation 'no.nav.testnav.libs:reactive-core'
implementation 'no.nav.testnav.libs:security-core'
implementation 'no.nav.testnav.libs:servlet-core'
implementation 'no.nav.testnav.libs:servlet-insecure-security'
implementation 'no.nav.testnav.libs:servlet-security'
implementation 'org.projectlombok:lombok'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.cloud:spring-cloud-starter-vault-config'

runtimeOnly 'io.micrometer:micrometer-registry-prometheus'

testAnnotationProcessor 'org.projectlombok:lombok'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.testcontainers:junit-jupiter'
}

test {
useJUnitPlatform()
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
}

jacocoTestReport {
reports {
xml.required = true
}
}

sonarqube {
properties {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
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-budpro-service"
property "sonar.projectName", "testnav-budpro-service"
property "sonar.sourceEncoding", "UTF-8"
}
}
36 changes: 36 additions & 0 deletions apps/budpro-service/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: "nais.io/v1alpha1"
kind: "Application"
metadata:
name: "testnav-budpro-service"
namespace: "dolly"
labels:
"team": "dolly"
spec:
accessPolicy:
inbound:
rules:
- application: team-dolly-lokal-app
- application: testnav-dollystatus
outbound:
rules:
- application: generer-navn-service
azure:
application:
allowAllUsers: true
enabled: true
tenant: nav.no
image: {{image}}
ingresses:
- "https://testnav-budpro-service.intern.dev.nav.no"
liveness:
initialDelay: 45
path: "/internal/health/liveness"
prometheus:
enabled: true
path: "/internal/prometheus"
readiness:
initialDelay: 45
path: "/internal/health/readiness"
replicas:
min: 1
max: 1
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading