Skip to content

Commit

Permalink
feat. Oppgradert nav-dekoratør til nyeste versjon
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikv committed Feb 15, 2024
1 parent 49a8ea6 commit 47f5ba9
Show file tree
Hide file tree
Showing 19 changed files with 369 additions and 776 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/bygg-og-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,31 @@ jobs:
steps:
- name: Sjekk ut kode
uses: actions/checkout@v3
- name: Setup node.js
uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'
- name: Install
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Server install
working-directory: ./server
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Kjør tester
run: npm run test
- name: Server build
working-directory: ./server
run: npm run build
- name: Install
run: npm ci
- name: Kjør tester
run: npm run test
- name: Build
run: npm run build
- name: Sentry release
run: npm run release
- name: Remove source maps
run: |
rm dist/assets/*.map
- name: Bygg, tag og push Docker-image
run: |
echo ${GITHUB_TOKEN} | docker login ghcr.io -u ${GITHUB_REPOSITORY} --password-stdin
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/bygg-og-deploy-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,31 @@ jobs:
steps:
- name: Sjekk ut kode
uses: actions/checkout@v3
- name: Setup node.js
uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'
- name: Install
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Server install
working-directory: ./server
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Kjør tester
run: npm run test
- name: Server build
working-directory: ./server
run: npm run build
- name: Install
run: npm ci
- name: Kjør tester
run: npm run test
- name: Build
run: npm run build
- name: Sentry release
run: npm run release
- name: Remove source maps
run: |
rm dist/assets/*.map
- name: Bygg, tag og push Docker-image
run: |
echo ${GITHUB_TOKEN} | docker login ghcr.io -u ${GITHUB_REPOSITORY} --password-stdin
Expand Down
24 changes: 8 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# Tiltaksgjennomføring

Starte via Yarn med REST-API (krever at https://github.com/navikt/tiltaksgjennomforing-api også kjører lokalt).
`yarn start`

Starte med mocket backend
`yarn run mock`

Starte med ordinær backend
`yarn run server`
`npm run start`

Bygg image
`docker build -t tiltaksgjennomforing .`
Expand All @@ -17,14 +11,12 @@ Kjør container

Åpnes i browser: [http://localhost:3000/tiltaksgjennomforing](http://localhost:3000/tiltaksgjennomforing)

### Testing

Vi bruker jest for å teste. `yarn test` kjører testene og setter dem i watch modus.
## Installere
Før du kjører `install` så må du sette opp autentisering mot @navikt.

Enkle regler for testing her:
`@navikt` pakker publiseres nå kun i GitHub Packages registry'et.
For å kunne installere nyere versjoner må pakker fra @navikt-orgen scopes til GitHub Packages.

- Alle `.tsx`-filer skal ha en tilsvarende `spec.tsx`-fil. Disse filene skal inneholde en komponent
som default export. Andre funksjoner exporteres utenom for å testes i egen tester.
- Kun lag en rendertest per `spec.tsx`-fil om du har behov for å teste at variasjoner rendrer riktig
kan det godt være at du har lagt deg på feil abstraksonsnivå. Logikk bør wrappes i funksjoner og testes
i egne tester i `spec.tsx`-fila.
1. Opprett et [PAT på github](https://github.com/settings/tokens) med `read:package` scope
2. Kjør `npm login --registry=https://npm.pkg.github.com --auth-type=legacy` (bruk PAT fra forrige steg som passord ved login)
3. Legg til `@navikt:registry=https://npm.pkg.github.com` i `.npmrc`.
1 change: 0 additions & 1 deletion nais/dev-gcp-ekstern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
"proxy-cluster": "dev-fss"
"aad-redirect-url": "https://tiltaksgjennomforing.ekstern.dev.nav.no/oauth2/callback"
"notifikasjon-audience": "dev-gcp:fager:notifikasjon-bruker-api"
"decorator-host": "dekoratoren.ekstern.dev.nav.no"
"arbeidsgiver-dialog": "https://navdialog--sit2.sandbox.my.site.com/arbeidsgiverdialogtest/s"
1 change: 0 additions & 1 deletion nais/dev-gcp-intern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
"decorator-internal": "https://internarbeidsflatedecorator-q0.dev.adeo.no"
"decorator-internal-script": "/internarbeidsflatedecorator/v2.1/static/js/head.v2.min.js"
"decorator-internal-styling": "/internarbeidsflatedecorator/v2.1/static/css/main.css"
"decorator-host": "dekoratoren.ekstern.dev.nav.no"
3 changes: 2 additions & 1 deletion nais/nais-gcp-ekstern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ spec:
namespace: arbeidsgiver
- application: notifikasjon-bruker-api
namespace: fager
- application: nav-dekoratoren
namespace: personbruker
external:
- host: tiltak-proxy.{{{proxy-cluster}}}-pub.nais.io
- host: '{{{decorator-host}}}'
3 changes: 2 additions & 1 deletion nais/nais-gcp-intern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ spec:
cluster: '{{{proxy-cluster}}}'
- application: tiltak-stillingstitler
namespace: arbeidsgiver
- application: nav-dekoratoren
namespace: personbruker
external:
- host: tiltak-proxy.{{{proxy-cluster}}}-pub.nais.io
- host: '{{{decorator-host}}}'
1 change: 0 additions & 1 deletion nais/prod-gcp-ekstern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
"aad-redirect-url": "https://arbeidsgiver.nav.no/tiltaksgjennomforing/oauth2/callback"
"notifikasjon-audience": "prod-gcp:fager:notifikasjon-bruker-api"
"arbeidsgiver-dialog": "https://arbeidsgiverdialog.nav.no/s"
"decorator-host": "www.nav.no"
1 change: 0 additions & 1 deletion nais/prod-gcp-intern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
"decorator-internal": "https://internarbeidsflatedecorator.intern.nav.no"
"decorator-internal-script": "/internarbeidsflatedecorator/v2.1/static/js/head.v2.min.js"
"decorator-internal-styling": "/internarbeidsflatedecorator/v2.1/static/css/main.css"
"decorator-host": "www.nav.no"
Loading

0 comments on commit 47f5ba9

Please sign in to comment.