Skip to content

Commit

Permalink
Merge pull request #539 from navikt/migrere-til-vite
Browse files Browse the repository at this point in the history
Migrere til vite
  • Loading branch information
terjeofnorway authored Jul 15, 2024
2 parents 7863bb8 + abe8bea commit 487da54
Show file tree
Hide file tree
Showing 126 changed files with 4,891 additions and 2,503 deletions.
29 changes: 14 additions & 15 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
ENV=prod
REACT_APP_MILJO=local
REACT_APP_VERSION=local
REACT_APP_URL=http://localhost:3000/person/personopplysninger
REACT_APP_DINE_SAKER_URL=https://person.nav.no/mine-saker
REACT_APP_PDL_URL=https://www.nav.no/person/pdl-fullmakt-ui
REACT_APP_SKJERMING_URL=https://www.nav.no/person/personopplysninger/skjerming
REACT_APP_API_URL=http://localhost:8080/person/personopplysninger-api
REACT_APP_DSOP_URL=http://localhost:8081/person/dsop-api
REACT_APP_UTBETALINGSOVERSIKT_URL=https://www.intern.dev.nav.no/utbetalingsoversikt
REACT_APP_SYKEFRAVAER_URL=https://www.ekstern.dev.nav.no/syk/sykefravaer
REACT_APP_LOGIN_URL=https://loginservice-q.nav.no/login
REACT_APP_INNLOGGINGSSTATUS_URL=http://localhost:8095/innloggingsstatus/auth
REACT_APP_DITT_NAV_URL=https://www.nav.no/minside
REACT_APP_TELEMETRY_URL=http://localhost:12347/collect
VITE_ENV=local
VITE_BUILD_VERSION=localbuild
VITE_APP_URL=http://localhost:3000/person/personopplysninger
VITE_DINE_SAKER_URL=https://person.nav.no/mine-saker
VITE_PDL_URL=https://www.nav.no/person/pdl-fullmakt-ui
VITE_SKJERMING_URL=https://www.nav.no/person/personopplysninger/skjerming
VITE_API_URL=http://localhost:8080/person/personopplysninger-api
VITE_DSOP_URL=http://localhost:8081/person/dsop-api
VITE_UTBETALINGSOVERSIKT_URL=https://www.intern.dev.nav.no/utbetalingsoversikt
VITE_SYKEFRAVAER_URL=https://www.ekstern.dev.nav.no/syk/sykefravaer
VITE_LOGIN_URL=https://loginservice-q.nav.no/login
VITE_INNLOGGINGSSTATUS_URL=http://localhost:8095/innloggingsstatus/auth
VITE_DITT_NAV_URL=https://www.nav.no/minside
VITE_TELEMETRY_URL=http://localhost:12347/collect
58 changes: 29 additions & 29 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,46 @@ on:
appOrigin:
required: true
type: string
REACT_APP_VERSION:
VITE_BUILD_VERSION:
required: true
type: string
REACT_APP_DINE_SAKER_URL:
VITE_DINE_SAKER_URL:
required: true
type: string
REACT_APP_PDL_URL:
VITE_PDL_URL:
required: true
type: string
REACT_APP_SKJERMING_URL:
VITE_SKJERMING_URL:
required: true
type: string
REACT_APP_URL:
VITE_APP_URL:
required: true
type: string
REACT_APP_API_URL:
VITE_API_URL:
required: true
type: string
REACT_APP_DSOP_URL:
VITE_DSOP_URL:
required: true
type: string
REACT_APP_UTBETALINGSOVERSIKT_URL:
VITE_UTBETALINGSOVERSIKT_URL:
required: true
type: string
REACT_APP_SYKEFRAVAER_URL:
VITE_SYKEFRAVAER_URL:
required: true
type: string
REACT_APP_LOGIN_URL:
VITE_LOGIN_URL:
required: true
type: string
REACT_APP_DITT_NAV_URL:
VITE_DITT_NAV_URL:
required: true
type: string
REACT_APP_PENSJONSOPPTJENING_URL:
VITE_PENSJONSOPPTJENING_URL:
required: true
type: string
REACT_APP_INNLOGGINGSSTATUS_URL:
VITE_INNLOGGINGSSTATUS_URL:
required: true
type: string
REACT_APP_TELEMETRY_URL:
VITE_TELEMETRY_URL:
required: true
type: string
secrets:
Expand Down Expand Up @@ -89,21 +89,21 @@ jobs:
echo "PUBLIC_URL=https://cdn.nav.no/personbruker/personopplysninger/$(echo ${IMAGE_VERSION_RAW,,})/build" >> $GITHUB_ENV
- name: Define client-side environment
run: |
echo "REACT_APP_MILJO=${{ inputs.env }}" >> $GITHUB_ENV
echo "REACT_APP_VERSION=${{ inputs.REACT_APP_VERSION }}" >> $GITHUB_ENV
echo "REACT_APP_DINE_SAKER_URL=${{ inputs.REACT_APP_DINE_SAKER_URL }}" >> $GITHUB_ENV
echo "REACT_APP_PDL_URL=${{ inputs.REACT_APP_PDL_URL }}" >> $GITHUB_ENV
echo "REACT_APP_SKJERMING_URL=${{ inputs.REACT_APP_SKJERMING_URL }}" >> $GITHUB_ENV
echo "REACT_APP_URL=${{ inputs.REACT_APP_URL }}" >> $GITHUB_ENV
echo "REACT_APP_API_URL=${{ inputs.REACT_APP_API_URL }}" >> $GITHUB_ENV
echo "REACT_APP_DSOP_URL=${{ inputs.REACT_APP_DSOP_URL }}" >> $GITHUB_ENV
echo "REACT_APP_LOGIN_URL=${{ inputs.REACT_APP_LOGIN_URL }}" >> $GITHUB_ENV
echo "REACT_APP_DITT_NAV_URL=${{ inputs.REACT_APP_DITT_NAV_URL }}" >> $GITHUB_ENV
echo "REACT_APP_UTBETALINGSOVERSIKT_URL=${{ inputs.REACT_APP_UTBETALINGSOVERSIKT_URL }}" >> $GITHUB_ENV
echo "REACT_APP_SYKEFRAVAER_URL=${{ inputs.REACT_APP_SYKEFRAVAER_URL }}" >> $GITHUB_ENV
echo "REACT_APP_PENSJONSOPPTJENING_URL=${{ inputs.REACT_APP_PENSJONSOPPTJENING_URL }}" >> $GITHUB_ENV
echo "REACT_APP_INNLOGGINGSSTATUS_URL=${{ inputs.REACT_APP_INNLOGGINGSSTATUS_URL }}" >> $GITHUB_ENV
echo "REACT_APP_TELEMETRY_URL=${{ inputs.REACT_APP_TELEMETRY_URL }}" >> $GITHUB_ENV
echo "VITE_ENV=${{ inputs.env }}" >> $GITHUB_ENV
echo "VITE_BUILD_VERSION=${{ inputs.VITE_BUILD_VERSION }}" >> $GITHUB_ENV
echo "VITE_DINE_SAKER_URL=${{ inputs.VITE_DINE_SAKER_URL }}" >> $GITHUB_ENV
echo "VITE_PDL_URL=${{ inputs.VITE_PDL_URL }}" >> $GITHUB_ENV
echo "VITE_SKJERMING_URL=${{ inputs.VITE_SKJERMING_URL }}" >> $GITHUB_ENV
echo "VITE_APP_URL=${{ inputs.VITE_APP_URL }}" >> $GITHUB_ENV
echo "VITE_API_URL=${{ inputs.VITE_API_URL }}" >> $GITHUB_ENV
echo "VITE_DSOP_URL=${{ inputs.VITE_DSOP_URL }}" >> $GITHUB_ENV
echo "VITE_LOGIN_URL=${{ inputs.VITE_LOGIN_URL }}" >> $GITHUB_ENV
echo "VITE_DITT_NAV_URL=${{ inputs.VITE_DITT_NAV_URL }}" >> $GITHUB_ENV
echo "VITE_UTBETALINGSOVERSIKT_URL=${{ inputs.VITE_UTBETALINGSOVERSIKT_URL }}" >> $GITHUB_ENV
echo "VITE_SYKEFRAVAER_URL=${{ inputs.VITE_SYKEFRAVAER_URL }}" >> $GITHUB_ENV
echo "VITE_PENSJONSOPPTJENING_URL=${{ inputs.VITE_PENSJONSOPPTJENING_URL }}" >> $GITHUB_ENV
echo "VITE_INNLOGGINGSSTATUS_URL=${{ inputs.VITE_INNLOGGINGSSTATUS_URL }}" >> $GITHUB_ENV
echo "VITE_TELEMETRY_URL=${{ inputs.VITE_TELEMETRY_URL }}" >> $GITHUB_ENV
- name: Install dependencies
run: npm ci
env:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/deploy.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ jobs:
env: dev
imageSuffix: dev-deploy
appOrigin: "https://www.ansatt.dev.nav.no"
REACT_APP_VERSION: "dev-${{ github.sha }}"
REACT_APP_DINE_SAKER_URL: "https://www.intern.dev.nav.no/mine-saker"
REACT_APP_PDL_URL: "https://www.intern.dev.nav.no/person/pdl-fullmakt-ui"
REACT_APP_SKJERMING_URL: "https://skjerming-ui.intern.dev.nav.no/person/personopplysninger/skjerming"
REACT_APP_URL: "https://www.ansatt.dev.nav.no/person/personopplysninger"
REACT_APP_API_URL: "https://www.ansatt.dev.nav.no/person/personopplysninger-api"
REACT_APP_DSOP_URL: "https://www.ansatt.dev.nav.no/person/dsop-api"
REACT_APP_UTBETALINGSOVERSIKT_URL: "https://www.intern.dev.nav.no/utbetalingsoversikt/"
REACT_APP_SYKEFRAVAER_URL: "https://www.ekstern.dev.nav.no/syk/sykefravaer"
REACT_APP_LOGIN_URL: "https://login.ekstern.dev.nav.no/oauth2/login"
REACT_APP_DITT_NAV_URL: "https://www.intern.dev.nav.no/minside"
REACT_APP_PENSJONSOPPTJENING_URL: "https://www-q0.nav.no/pensjon/opptjening"
REACT_APP_INNLOGGINGSSTATUS_URL: "https://www.ekstern.dev.nav.no/person/nav-dekoratoren-api/auth"
REACT_APP_TELEMETRY_URL: "https://telemetry.ekstern.dev.nav.no/collect"
VITE_BUILD_VERSION: "dev-${{ github.sha }}"
VITE_DINE_SAKER_URL: "https://www.intern.dev.nav.no/mine-saker"
VITE_PDL_URL: "https://www.intern.dev.nav.no/person/pdl-fullmakt-ui"
VITE_SKJERMING_URL: "https://skjerming-ui.intern.dev.nav.no/person/personopplysninger/skjerming"
VITE_APP_URL: "https://www.ansatt.dev.nav.no/person/personopplysninger"
VITE_API_URL: "https://www.ansatt.dev.nav.no/person/personopplysninger-api"
VITE_DSOP_URL: "https://www.ansatt.dev.nav.no/person/dsop-api"
VITE_UTBETALINGSOVERSIKT_URL: "https://www.intern.dev.nav.no/utbetalingsoversikt/"
VITE_SYKEFRAVAER_URL: "https://www.ekstern.dev.nav.no/syk/sykefravaer"
VITE_LOGIN_URL: "https://login.ekstern.dev.nav.no/oauth2/login"
VITE_DITT_NAV_URL: "https://www.intern.dev.nav.no/minside"
VITE_PENSJONSOPPTJENING_URL: "https://www-q0.nav.no/pensjon/opptjening"
VITE_INNLOGGINGSSTATUS_URL: "https://www.ekstern.dev.nav.no/person/nav-dekoratoren-api/auth"
VITE_TELEMETRY_URL: "https://telemetry.ekstern.dev.nav.no/collect"
secrets:
READER_TOKEN: ${{ secrets.READER_TOKEN }}
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
28 changes: 14 additions & 14 deletions .github/workflows/deploy.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
env: prod
imageSuffix: release-${{ github.ref_name }}
appOrigin: "https://www.nav.no"
REACT_APP_VERSION: ${{ github.event.release.tag_name }}
REACT_APP_DINE_SAKER_URL: "https://person.nav.no/mine-saker"
REACT_APP_PDL_URL: "https://www.nav.no/person/pdl-fullmakt-ui"
REACT_APP_SKJERMING_URL: "https://www.nav.no/person/personopplysninger/skjerming"
REACT_APP_URL: "https://www.nav.no/person/personopplysninger"
REACT_APP_API_URL: "https://www.nav.no/person/personopplysninger-api"
REACT_APP_DSOP_URL: "https://www.nav.no/person/dsop-api"
REACT_APP_UTBETALINGSOVERSIKT_URL: "https://tjenester.nav.no/utbetalingsoversikt"
REACT_APP_SYKEFRAVAER_URL: "https://www.nav.no/syk/sykefravaer"
REACT_APP_LOGIN_URL: "https://login.nav.no/oauth2/login"
REACT_APP_DITT_NAV_URL: "https://www.nav.no/minside"
REACT_APP_PENSJONSOPPTJENING_URL: "https://www.nav.no/pensjon/opptjening"
REACT_APP_INNLOGGINGSSTATUS_URL: "https://www.nav.no/person/nav-dekoratoren-api/auth"
REACT_APP_TELEMETRY_URL: "https://telemetry.nav.no/collect"
VITE_BUILD_VERSION: ${{ github.event.release.tag_name }}
VITE_DINE_SAKER_URL: "https://person.nav.no/mine-saker"
VITE_PDL_URL: "https://www.nav.no/person/pdl-fullmakt-ui"
VITE_SKJERMING_URL: "https://www.nav.no/person/personopplysninger/skjerming"
VITE_APP_URL: "https://www.nav.no/person/personopplysninger"
VITE_API_URL: "https://www.nav.no/person/personopplysninger-api"
VITE_DSOP_URL: "https://www.nav.no/person/dsop-api"
VITE_UTBETALINGSOVERSIKT_URL: "https://tjenester.nav.no/utbetalingsoversikt"
VITE_SYKEFRAVAER_URL: "https://www.nav.no/syk/sykefravaer"
VITE_LOGIN_URL: "https://login.nav.no/oauth2/login"
VITE_DITT_NAV_URL: "https://www.nav.no/minside"
VITE_PENSJONSOPPTJENING_URL: "https://www.nav.no/pensjon/opptjening"
VITE_INNLOGGINGSSTATUS_URL: "https://www.nav.no/person/nav-dekoratoren-api/auth"
VITE_TELEMETRY_URL: "https://telemetry.nav.no/collect"
secrets:
READER_TOKEN: ${{ secrets.READER_TOKEN }}
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
7 changes: 4 additions & 3 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<!DOCTYPE html>
<!doctype html>
<html lang="no">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="stylesheet" href="%PUBLIC_URL%/index.css" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/index.css" />
<title>Personopplysninger - www.nav.no</title>
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div class="pagewrapper">
<main class="app" id="maincontent"></main>
</div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading

0 comments on commit 487da54

Please sign in to comment.