Skip to content

Commit

Permalink
Java21 konfig - flytting av fp-konfig. (#1332)
Browse files Browse the repository at this point in the history
* Initial commit

* Bump actions/cache from v2 to v2.1.4 (#1)

Bumps [actions/cache](https://github.com/actions/cache) from v2 to v2.1.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](actions/cache@v2...26968a0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fikser tester og codeql. (#2)

* Fjerner assertj og bruke junit assertion.

* Sonar oppsett. (#3)

* Fikser noen sonal feil. (#4)

* Fikser mer sonar feil (#5)

* Feature/fiks package (#6)

* Fisker noe sonar meldinger.

* Flytter alt til no.nav.foreldrepenger.konfig

* Ordner README

* Utvider README.

* Oppdater java-setup til 2.0 og cache. (#9)

* Oppdater java-setup til 2.0 og cache.
* Legger på gettet for nais app name.

* Bump actions/cache from v2.1.4 to v2.1.5 (#10)

Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](actions/cache@v2.1.4...1a9e213)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* case insensitive (#11)

Co-authored-by: Jan-Olav Eide <[email protected]>

* Update Cluster.java (#13)

* long (#15)

* Vtp (#16)

* long

* vtp

Co-authored-by: Jan-Olav Eide <[email protected]>

* ikke lowercase values (#20)

Co-authored-by: Jan-Olav Eide <[email protected]>

* Bump logback-classic from 1.2.3 to 1.2.6 (#28)

Bumps logback-classic from 1.2.3 to 1.2.6.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/cache from 2.1.5 to 2.1.6 (#17)

Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](actions/cache@v2.1.5...v2.1.6)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Legger på eksempel med Environment.getProperty (#32)

* Bump slf4j-api from 1.7.30 to 1.7.32 (#22)

Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.30 to 1.7.32.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/commits)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump junit5.version from 5.7.1 to 5.8.1 (#30)

Bumps `junit5.version` from 5.7.1 to 5.8.1.

Updates `junit-jupiter-api` from 5.7.1 to 5.8.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.7.1...r5.8.1)

Updates `junit-jupiter-engine` from 5.7.1 to 5.8.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.7.1...r5.8.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump jandex-maven-plugin from 1.0.8 to 1.2.1 (#31)

Bumps [jandex-maven-plugin](https://github.com/wildfly/jandex-maven-plugin) from 1.0.8 to 1.2.1.
- [Release notes](https://github.com/wildfly/jandex-maven-plugin/releases)
- [Commits](wildfly/jandex-maven-plugin@1.0.8...1.2.1)

---
updated-dependencies:
- dependency-name: org.jboss.jandex:jandex-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump logback-classic from 1.2.6 to 1.2.7 (#33)

Bumps logback-classic from 1.2.6 to 1.2.7.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Makes no sense - er null uansett. (#44)

* Update workflow - bump versions. (#45)

* Bruker app.name istd namespace for lokalt kjøring. (#46)

* Bruker app.name istd namespace for lokalt kjøring.
* Oppdatert readme.

* Bump maven-surefire-plugin from 3.0.0-M5 to 3.0.0-M7 (#53)

Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M5 to 3.0.0-M7.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-3.0.0-M5...surefire-3.0.0-M7)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pom.xml

* Bump maven-compiler-plugin from 3.8.1 to 3.10.1 (#54)

Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.8.1 to 3.10.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](apache/maven-compiler-plugin@maven-compiler-plugin-3.8.1...maven-compiler-plugin-3.10.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github/codeql-action from 1 to 2 (#52)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michal J. Sladek <[email protected]>

* Bump actions/setup-java from 2 to 3 (#51)

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2 to 3.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michal J. Sladek <[email protected]>

* Bump logback-classic from 1.2.10 to 1.2.11 (#49)

Bumps logback-classic from 1.2.10 to 1.2.11.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/checkout from 2 to 3 (#48)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michal J. Sladek <[email protected]>

* Bump slf4j-api from 1.7.35 to 1.7.36 (#47)

Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.35 to 1.7.36.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](qos-ch/slf4j@v_1.7.35...v_1.7.36)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pom.xml (#58)

* Bump junit5.version from 5.8.2 to 5.9.0 (#57)

Bumps `junit5.version` from 5.8.2 to 5.9.0.

Updates `junit-jupiter-api` from 5.8.2 to 5.9.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.8.2...r5.9.0)

Updates `junit-jupiter-engine` from 5.8.2 to 5.9.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.8.2...r5.9.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michal J. Sladek <[email protected]>

* Bump jandex-maven-plugin from 1.2.2 to 1.2.3 (#56)

Bumps [jandex-maven-plugin](https://github.com/wildfly/jandex-maven-plugin) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/wildfly/jandex-maven-plugin/releases)
- [Commits](wildfly/jandex-maven-plugin@1.2.2...1.2.3)

---
updated-dependencies:
- dependency-name: org.jboss.jandex:jandex-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michal J. Sladek <[email protected]>

* Bump junit5.version from 5.9.0 to 5.9.1 (#64)

Bumps `junit5.version` from 5.9.0 to 5.9.1.

Updates `junit-jupiter-api` from 5.9.0 to 5.9.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.9.0...r5.9.1)

Updates `junit-jupiter-engine` from 5.9.0 to 5.9.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.9.0...r5.9.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump maven-surefire-plugin from 3.0.0-M5 to 3.0.0-M7 (#59)

Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M5 to 3.0.0-M7.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-3.0.0-M5...surefire-3.0.0-M7)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michal J. Sladek <[email protected]>
Co-authored-by: Jens-Otto Larsen <[email protected]>

* Bruker felles GHA bygg (#69)

* Forenkler codeql

* Bump slf4j-api from 2.0.3 to 2.0.6 (#72)

Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 2.0.3 to 2.0.6.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](qos-ch/slf4j@v_2.0.3...v_2.0.6)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump fp-bom 0.3.11

* Forenkle cluster og foreldrepenger namespace (#73)

* Forenkle cluster og foreldrepenger namespace

* Behold skille local / vtp i cluster

* Standardisere NAIS-env elementer og mer clientId (#74)

Standardisere NAIS-env elementer mer clientId

* Environment tilbyr nais app image name (#75)

* Update bom 0.4.3 (#76)

* Slå sammen vtp+local, metoder for fss og gcp, sonar (#77)

* Slå sammen vtp+local, metoder for fss og gcp, sonar

* Feil ifm copy/paste

* Ikke bruk fp-bom i biblioteker - flatten release.

---------

Co-authored-by: Michal J. Sladek <[email protected]>

* Update README.md

* Bump jacoco-maven-plugin from 0.8.8 to 0.8.9 (#84)

Bumps [jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.8 to 0.8.9.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](jacoco/jacoco@v0.8.8...v0.8.9)

---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump flatten-maven-plugin from 1.3.0 to 1.4.1 (#83)

Bumps [flatten-maven-plugin](https://github.com/mojohaus/flatten-maven-plugin) from 1.3.0 to 1.4.1.
- [Release notes](https://github.com/mojohaus/flatten-maven-plugin/releases)
- [Commits](mojohaus/flatten-maven-plugin@flatten-maven-plugin-1.3.0...1.4.1)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:flatten-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens-Otto Larsen <[email protected]>

* Bump maven-install-plugin from 3.1.0 to 3.1.1 (#82)

Bumps [maven-install-plugin](https://github.com/apache/maven-install-plugin) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/apache/maven-install-plugin/releases)
- [Commits](apache/maven-install-plugin@maven-install-plugin-3.1.0...maven-install-plugin-3.1.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-install-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens-Otto Larsen <[email protected]>

* Bump maven-deploy-plugin from 3.1.0 to 3.1.1 (#81)

Bumps [maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/apache/maven-deploy-plugin/releases)
- [Commits](apache/maven-deploy-plugin@maven-deploy-plugin-3.1.0...maven-deploy-plugin-3.1.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-deploy-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens-Otto Larsen <[email protected]>

* Bump slf4j-api from 2.0.6 to 2.0.7 (#80)

Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/commits)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens-Otto Larsen <[email protected]>

* Bump maven-surefire-plugin from 2.22.2 to 3.0.0 (#78)

Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 2.22.2 to 3.0.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-2.22.2...surefire-3.0.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens-Otto Larsen <[email protected]>

* GA: Legger til codql (#85)

* Bump junit.version from 5.9.2 to 5.9.3 (#87)

Bumps `junit.version` from 5.9.2 to 5.9.3.

Updates `junit-jupiter-api` from 5.9.2 to 5.9.3
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.9.2...r5.9.3)

Updates `junit-jupiter-engine` from 5.9.2 to 5.9.3
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.9.2...r5.9.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump maven-surefire-plugin from 3.0.0 to 3.1.0 (#88)

Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-3.0.0...surefire-3.1.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump jacoco-maven-plugin from 0.8.9 to 0.8.10 (#86)

Bumps [jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.9 to 0.8.10.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](jacoco/jacoco@v0.8.9...v0.8.10)

---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens-Otto Larsen <[email protected]>

* Bump flatten-maven-plugin from 1.4.1 to 1.5.0 (#89)

Bumps [flatten-maven-plugin](https://github.com/mojohaus/flatten-maven-plugin) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/mojohaus/flatten-maven-plugin/releases)
- [Commits](mojohaus/flatten-maven-plugin@1.4.1...1.5.0)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:flatten-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump maven-source-plugin from 3.2.1 to 3.3.0 (#90)

Bumps [maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.2.1 to 3.3.0.
- [Commits](apache/maven-source-plugin@maven-source-plugin-3.2.1...maven-source-plugin-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-source-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump maven-clean-plugin from 3.2.0 to 3.3.1 (#92)

Bumps [maven-clean-plugin](https://github.com/apache/maven-clean-plugin) from 3.2.0 to 3.3.1.
- [Release notes](https://github.com/apache/maven-clean-plugin/releases)
- [Commits](apache/maven-clean-plugin@maven-clean-plugin-3.2.0...maven-clean-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-clean-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump maven-surefire-plugin from 3.1.0 to 3.1.2 (#91)

Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.0 to 3.1.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-3.1.0...surefire-3.1.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Updaterer readme

* Instramming github token scopes (#93)

* Release konfig-jakarta artefakt (#94)

* Bump dev-jakarta-transform 0.6.10

* Update dependabot.yml

* Rydder opp i POMen. (#95)

* Det virker at jakarta støtter eldre index (#98)

* Fjerner transformer bygg (#99)

* Bump ch.qos.logback:logback-classic from 1.4.8 to 1.4.11 (#104)

Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.8 to 1.4.11.
- [Commits](qos-ch/logback@v_1.4.8...v_1.4.11)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump junit.version from 5.9.3 to 5.10.0 (#101)

Bumps `junit.version` from 5.9.3 to 5.10.0.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.9.3 to 5.10.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.9.3...r5.10.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.9.3 to 5.10.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.9.3...r5.10.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michal J. Sladek <[email protected]>

* Jakarta EE9 release. (#100)

* Fikser feil i patch til beans schema.

* Java 21 og smallrye/jandex (#113)

* Java 21 og smallrye/jandex

* Revert ti jboss jandex

* Smallrye v10

* Fikser jandex version

---------

Co-authored-by: Michal J. Sladek <[email protected]>

* Prepare for felles

* Java 21 konfig, forbereder for fp-konfig

* Rydder i dependencies og fikser test.

* Bruker egen konfig

* Utvider README til konfig

* Bump graphql codegen

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jan-olaveide <[email protected]>
Co-authored-by: Jan-Olav Eide <[email protected]>
Co-authored-by: Jens-Otto Larsen <[email protected]>
Co-authored-by: Espen Waaga <[email protected]>
  • Loading branch information
6 people authored Nov 17, 2023
1 parent 934f898 commit 33d64a0
Show file tree
Hide file tree
Showing 36 changed files with 1,728 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17
21.0
4 changes: 2 additions & 2 deletions felles/abac/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<artifactId>felles-feil</artifactId>
</dependency>
<dependency>
<groupId>no.nav.foreldrepenger</groupId>
<artifactId>konfig</artifactId>
<groupId>no.nav.foreldrepenger.felles</groupId>
<artifactId>felles-konfig</artifactId>
</dependency>
<dependency>
<groupId>no.nav.foreldrepenger.felles</groupId>
Expand Down
91 changes: 91 additions & 0 deletions felles/konfig/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
### OBS!!! Deprecated - funksjonalitet ble flyttet til fp-felles og utvikler videre der.

[![Bygg](https://github.com/navikt/fp-konfig/actions/workflows/build.yml/badge.svg)](https://github.com/navikt/fp-konfig/actions/workflows/build.yml)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=navikt_fp-konfig&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=navikt_fp-konfig)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=navikt_fp-konfig&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=navikt_fp-konfig)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=navikt_fp-konfig&metric=coverage)](https://sonarcloud.io/summary/new_code?id=navikt_fp-konfig)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=navikt_fp-konfig&metric=bugs)](https://sonarcloud.io/summary/new_code?id=navikt_fp-konfig)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=navikt_fp-konfig&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=navikt_fp-konfig)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=navikt_fp-konfig&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=navikt_fp-konfig)

![GitHub release (latest by date)](https://img.shields.io/github/v/release/navikt/fp-konfig)
![GitHub](https://img.shields.io/github/license/navikt/fp-konfig)


# fp-konfig

Java/CDI basert bibliotek som brukes til å håndtere app konfigurasjon avhengig av kubernetes cluster og namespace applikasjonen kjører i.

Det er mulig å injecte en spesifikk variable i en konstruktor eller felt ved å bruke ``@KonfigVerdi`` annotering.

## Bruk

### Konfig kilder

Biblioteket leter etter konfig i følgende kilder og bruker første verdi fra kilden hvor den finnes.

Prioriteten på kilder er som følge:

- Applikasjons properties med cluster og namespace (*application-prod-fss-default.properties*)
- Applikasjons properties med cluster (*application-prod-fss.properties*)
- Applikasjons properties (*application.properties*)
- Miljø variabler (generelt alt som finnes i *System.getenv()*)
- System properties (generelt alt som finnes i *System.getProperties()*)

For kjøring utenfor kubernetes f.eks. fra IDE defaultes cluster navn til "local" og namespace til verdi satt
i System.getProperty("app.name");
Dvs at man kan nå properties under application.properties, application-lokal.properties og application-lokal-<app.name>.properties

Det er mulig å plugge inn en egen provider ved å implementere `PropertiesKonfigVerdiProvider` klassen.

Løsningen er CDI basert.

### Bruk av `@KonfigVerdi`

Det er mulig å direkte `@Injecte` konfig som trenger ved å bruke `@KonfigVerdi` annotering i konstruktor eller direkte på et attribut.
Minimum oppsett:

- ```@KonfigVerdi(value = "min.property") String minProperty```
- ```@KonfigVerdi(value = "min.property", required=false) String minProperty``` - kaster ikke exception om verdien ikke finnes.
- ```@KonfigVerdi(value = "min.property", defaultVeidi="default konfig verdi") String minProperty``` - returnerer default verdi om verdien ikke finnes i konfig.
- ```
@KonfigVerdi(value = "min.property")
private String minProperty
Det er mulig å hente konfig direkte fra koden ved å kalle `getProperty` eller `getRequiredProperty` fra `Environment` klassen:
- ```Environment.current().getProperty("min.property")``` - returnerer en String eller null om det ikke finnes.
- ```Environment.current().getProperty("min.property", Integer.class)``` - returnerer en Integer, null om det ikke finnes eller Exception om ikke integer.
- ```Environment.current().getRequiredProperty("min.property")``` - returnerer en String, eller Exception om verdien ikke finnes.
Følgende typer støttes og kan bli returnert:
- String (default)
- Boolean / boolean
- Integer / int
- Period
- Duration
- LocalDate
- Long
- URI
- URL
### Bruk eksempler
- ```@KonfigVerdi(value = "test.enabled", required = false) boolean enabled``` == ```Environment.current().getProperty("test.enabled", integer.class)```
- ```@KonfigVerdi(value = "bruker.navn" String bruker``` == ```Environment.current().getProperty("bruker.navn")```
- ```@KonfigVerdi(value = "periode.fp") Period periode``` == ```Environment.current().getProperty("periode.fp", Period.class)```
- ```@KonfigVerdi(value = HENDELSE_BASE_ENDPOINT, defaultValue=DEFAULT_BASE_ENDPOINT) URI baseEndpoint``` == ```Environment.current().getProperty(HENDELSE_BASE_ENDPOINT, URI.class, DEFAULT_BASE_ENDPOINT)```
### Utilities
- `Environment` - statisk klasse som gir informasjon om miljøet appen kjører i.
- `Cluster` - statisk klasse med info om clusteret appen kjører i f.eks: isProd(), isDev(), isLocal(), etc.
- `Namespace` - statisk klasse som leverer egenskaper om namespacet appen kjører i f.eks: getName()
- `Application` - statisk klasse som leverer injisert navn på applikasjon: getName()
- `ClienId` - statisk klasse som leverer egenskaper om clientId for appen: getClientId()
### Lisens
MIT
42 changes: 42 additions & 0 deletions felles/konfig/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>felles</artifactId>
<groupId>no.nav.foreldrepenger.felles</groupId>
<version>0.0.0-SNAPSHOT</version>
</parent>

<artifactId>felles-konfig</artifactId>

<dependencies>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<environmentVariables>
<mvn>true</mvn>
<NAV>http://www.nav.no</NAV>
<NAIS_CLUSTER_NAME>prod-fss</NAIS_CLUSTER_NAME>
<NAIS_NAMESPACE>default</NAIS_NAMESPACE>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package no.nav.foreldrepenger.konfig;

import static java.lang.System.getenv;

import java.util.Optional;

public class Application {

private final String name;

private Application(String name) {
this.name = name;
}

public static Application of(String name) {
return new Application(name);
}

public String getName() {
return name;
}

public static Application current() {
return Application.of(Optional.ofNullable(getenv(NaisProperty.APPLICATION.propertyName())).orElse("vtp"));
}

@Override
public String toString() {
return getClass().getSimpleName() + "[application=" + name + "]";
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
package no.nav.foreldrepenger.konfig;

import static java.lang.System.getenv;
import static no.nav.foreldrepenger.konfig.StandardPropertySource.APP_PROPERTIES;

import java.io.IOException;
import java.util.Optional;
import java.util.Properties;

import jakarta.enterprise.context.Dependent;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import no.nav.foreldrepenger.konfig.KonfigVerdi.Converter;

@Dependent
public class ApplicationPropertiesKonfigProvider extends PropertiesKonfigVerdiProvider {

static class Init {
// lazy init singleton
static final Properties PROPS = lesFra();
private static final String SUFFIX = ".properties";
private static final String PREFIX = "application";

private Init() {
}

private static Properties lesFra() {
var c = new Properties();
lesFra(namespaceKonfig(), lesFra(clusterKonfig(), lesFra("", new Properties())))
.forEach((k, v) -> c.put(k.toString().toLowerCase(), v.toString()));
return c;
}

private static Properties lesFra(String infix, Properties p) {
if (infix == null) {
return p;
}
String navn = PREFIX + infix + SUFFIX;
try (var is = ApplicationPropertiesKonfigProvider.class.getClassLoader().getResourceAsStream(navn)) {
if (is != null) {
LOG.info("Laster properties fra {}", navn);
p.load(is);
return p;
}
} catch (IOException e) {
LOG.info("Propertyfil {} ikke lesbar", navn);
}
LOG.info("Propertyfil {} ikke funnet", navn);
return p;
}

private static String namespaceKonfig() {
var namespaceName = namespaceName();
if (namespaceName != null) {
return clusterKonfig() + "-" + namespaceName;
} else {
var appName = System.getProperty("app.name");
if (appName != null) {
return clusterKonfig() + "-" + appName;
}
}
return null;
}

private static String namespaceName() {
return getenv(NaisProperty.NAMESPACE.propertyName());
}

private static String clusterKonfig() {
return "-" + clusterName();
}

private static String clusterName() {
return Optional.ofNullable(getenv(NaisProperty.CLUSTER.propertyName()))
.orElse(Cluster.VTP.clusterName());
}
}

private static final int PRIORITET = EnvPropertiesKonfigVerdiProvider.PRIORITET + 1;

private static final Logger LOG = LoggerFactory.getLogger(ApplicationPropertiesKonfigProvider.class);

public ApplicationPropertiesKonfigProvider() {
super(Init.PROPS, APP_PROPERTIES);
}

@Override
public <V> V getVerdi(String key, Converter<V> converter) {
return Optional.ofNullable(super.getVerdi(key.toLowerCase(), converter))
.orElse(null);
}

@Override
public boolean harVerdi(String key) {
return super.harVerdi(key.toLowerCase());
}

@Override
public int getPrioritet() {
return PRIORITET;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package no.nav.foreldrepenger.konfig;

import static java.lang.System.getenv;

public class ClientId {

private static final String DELIMIT = ":";

private final String id;

private ClientId(String clientId) {
this.id = clientId;
}

public static ClientId of(String clientId) {
return new ClientId(clientId);
}

public static ClientId of(Cluster cluster, Namespace namespace, Application application) {
return of(cluster.clusterName(), namespace.getName(), application.getName());
}

public static ClientId of(Cluster cluster, Namespace namespace, String application) {
return of(cluster.clusterName(), namespace.getName(), application);
}

private static ClientId of(String cluster, String namespace, String application) {
return of(cluster + DELIMIT + namespace + DELIMIT + application);
}

public String getClientId() {
return id;
}

public static ClientId current() {
return ClientId.of(getenv(NaisProperty.CLIENTID.propertyName()));
}

@Override
public String toString() {
return getClass().getSimpleName() + "[clientId=" + id + "]";
}

}
Loading

0 comments on commit 33d64a0

Please sign in to comment.