diff --git a/.github/workflows/deploy_feature.yaml b/.github/workflows/deploy_feature.yaml deleted file mode 100644 index 7b906fd..0000000 --- a/.github/workflows/deploy_feature.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: Deploy feature -on: - push: - branches: - - '**' - - '!main' - - '!dependabot/**' -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - build-deploy: - name: "Build and deploy to feature" - permissions: - contents: "read" - id-token: "write" - uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main - secrets: inherit - - run_cucumber_tests-feature: - runs-on: ubuntu-latest - name: Run cucumber tests feature - needs: build-deploy - if: false #${{ always() && needs.build-deploy.outputs.deploy_suksess == 'true' }} - - env: - INGRESS_CUCUMBER: https://bidrag-cucumber-cloud-feature.ekstern.dev.nav.no - INGRESS_VEDTAK: https://bidrag-vedtak-feature.intern.dev.nav.no - - steps: - - run: | - curl -H "Content-Type: application/json" -i \ - -H "Authorization: Basic ${{ secrets.BIDRAG_CUCUMBER_CLOUD_AUTH }}" \ - --request POST \ - --data '{"noContextPathForApps":["bidrag-vedtak"],"ingressesForApps":[ - "${{ env.INGRESS_VEDTAK }}@tag:bidrag-vedtak" - ]}' \ - ${{ env.INGRESS_CUCUMBER }}/bidrag-cucumber-cloud/run | tee .cucumber-result - cat .cucumber-result | grep HTTP/2 | grep -c 200 > /dev/null # fails if count is 0 (http status is not ok, aka http status code is not 200) \ No newline at end of file diff --git a/.github/workflows/deploy_q1.yaml b/.github/workflows/deploy_q1.yaml index 48e2e21..b113e0d 100644 --- a/.github/workflows/deploy_q1.yaml +++ b/.github/workflows/deploy_q1.yaml @@ -3,6 +3,8 @@ on: workflow_dispatch: push: branches: + - '**' + - '!main' - 'q1/**' - 'Q1/**' env: @@ -21,7 +23,7 @@ jobs: run_cucumber_tests-feature: runs-on: ubuntu-latest - name: Run cucumber tests feature + name: Run cucumber tests q1 needs: build-deploy if: false #${{ always() && needs.build-deploy.outputs.deploy_suksess == 'true' }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 373abfd..6d905b8 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -8,43 +8,24 @@ env: jobs: build-deploy: - name: "Build and deploy syntetisk" + name: "Build and deploy q2" permissions: contents: "read" id-token: "write" uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main secrets: inherit with: - nais_variabler_filnavn: syntetisk.yaml - - deploy_main: - runs-on: ubuntu-latest - name: Deploy main - permissions: - contents: "read" - id-token: "write" - if: github.actor != 'dependabot[bot]' - needs: build-deploy - - steps: - - uses: actions/checkout@v4 - - name: Deploy to dev-gcp - uses: nais/deploy/actions/deploy@v2 - env: - CLUSTER: dev-gcp - RESOURCE: .nais/nais.yaml - VARS: .nais/main.yaml - IMAGE: ${{ needs.build-deploy.outputs.image }} + nais_variabler_filnavn: q2.yaml run_cucumber_tests-syntetisk: runs-on: ubuntu-latest - name: Run cucumber tests syntetisk + name: Run cucumber tests needs: build-deploy if: ${{ always() && needs.build-deploy.outputs.deploy_suksess == 'true' }} env: INGRESS_CUCUMBER: https://bidrag-cucumber-cloud.ekstern.dev.nav.no - INGRESS_VEDTAK: https://bidrag-vedtak-syntetisk.intern.dev.nav.no + INGRESS_VEDTAK: https://bidrag-vedtak-q2.intern.dev.nav.no steps: - run: | diff --git a/pom.xml b/pom.xml index 937ac73..fed12d3 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 3.2.0 - 2024.11.01.080248 + 2024.11.07.095708 1.9.22 5.3.1 9.40 diff --git a/src/main/kotlin/no/nav/bidrag/vedtak/persistence/entity/Grunnlag.kt b/src/main/kotlin/no/nav/bidrag/vedtak/persistence/entity/Grunnlag.kt index 2e88425..c59a73e 100644 --- a/src/main/kotlin/no/nav/bidrag/vedtak/persistence/entity/Grunnlag.kt +++ b/src/main/kotlin/no/nav/bidrag/vedtak/persistence/entity/Grunnlag.kt @@ -12,6 +12,7 @@ import jakarta.persistence.ManyToOne import no.nav.bidrag.domene.enums.grunnlag.Grunnlagstype import no.nav.bidrag.transport.behandling.felles.grunnlag.GrunnlagDto import no.nav.bidrag.transport.behandling.vedtak.request.OpprettGrunnlagRequestDto +import no.nav.bidrag.transport.felles.commonObjectmapper import org.hibernate.annotations.JdbcTypeCode import org.hibernate.type.SqlTypes import kotlin.reflect.full.memberProperties @@ -67,7 +68,7 @@ fun Grunnlag.toGrunnlagDto() = with(::GrunnlagDto) { callBy( parameters.associateWith { parameter -> when (parameter.name) { - GrunnlagDto::type.name -> Grunnlagstype.valueOf(type) + GrunnlagDto::type.name -> commonObjectmapper.readValue("\"$type\"", Grunnlagstype::class.java) GrunnlagDto::innhold.name -> stringTilJsonNode(innhold) GrunnlagDto::grunnlagsreferanseListe.name -> grunnlagsreferanseListe GrunnlagDto::gjelderReferanse.name -> gjelderReferanse diff --git a/src/test/kotlin/no/nav/bidrag/vedtak/TestUtil.kt b/src/test/kotlin/no/nav/bidrag/vedtak/TestUtil.kt index 7f199b4..c684638 100644 --- a/src/test/kotlin/no/nav/bidrag/vedtak/TestUtil.kt +++ b/src/test/kotlin/no/nav/bidrag/vedtak/TestUtil.kt @@ -103,7 +103,7 @@ class TestUtil { ), OpprettGrunnlagRequestDto( referanse = "SJAB-REF001", - type = Grunnlagstype.SJABLON, + type = Grunnlagstype.SJABLON_SJABLONTALL, innhold = ObjectMapper().readTree( """ {