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

Oppdater dev-next1 #6473

Closed
wants to merge 164 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
7eb4c55
Dev-next1 branch deployment til k9-next.dev.intern.nav.no (#6340)
josstn Jul 3, 2024
256b803
Bumper ft-pakke (#6346)
hallvardastark Jul 4, 2024
9fe293c
Fjerner gammal proxy referanse til diagnosekoder service. (#6351)
josstn Jul 5, 2024
af8334d
Aktiverer det nye meldingspanelet i testmiljø. (#6336)
josstn Jul 5, 2024
02b1827
Fiks maks lengde på brevtekst. (#6354)
josstn Jul 5, 2024
3ee3e42
Sjekker om exception er definert før bruk (#6355)
hallvardastark Jul 5, 2024
dc4cd89
Bump @navikt/k9-sak-typescript-client (#6359)
dependabot[bot] Jul 8, 2024
0a18db3
Bump the patch group across 1 directory with 6 updates (#6350)
dependabot[bot] Jul 9, 2024
dd8fcf8
Advarsel om søker ikke er sammen med barnet i sykdomssteget. (#6360)
ramrock93 Jul 9, 2024
2ef4e9b
Setter bakgrunnsfarge for varsel i MedisinskVilkår.
ramrock93 Jul 9, 2024
4906c22
Updated readme (#6367)
josstn Jul 10, 2024
a90e2da
Tsff 657 cleaning a bit (#6358)
josstn Jul 10, 2024
0a7771d
10 dager ttl på dev-next1 branch deployment. (#6376)
josstn Jul 10, 2024
e1adb31
bugfix inngang til saker fra salesforce
vebnor Jul 11, 2024
318405c
fikse story
vebnor Jul 11, 2024
4b1def1
Justert mellomrom i FormkravKlageForm.jsx skjema. (#6386)
josstn Jul 12, 2024
a810e59
Tsff 641/storbritannia skal ikke vises som eos land (#6389)
vebnor Jul 16, 2024
72fe77b
Fiks v2/backend/README.md (#6391)
josstn Jul 16, 2024
46dba94
Aktiver nytt meldingspanel i prod. (#6396)
josstn Jul 16, 2024
4ed0872
Github pipeline workflow uten issue for deployment. (#6404)
josstn Jul 19, 2024
3dee9a9
Oppdatering avhengigheter (#6406)
josstn Jul 19, 2024
d959ffe
Reduser oppdeling av dependabot PRs litt. (#6420)
josstn Jul 24, 2024
6e5be64
Dep adjust (#6423)
josstn Jul 24, 2024
d1f60a6
dev-next1 Application ttl må spesifiserast i timar.
josstn Jul 24, 2024
98d357b
Ekskluder eslint-plugin-vitest frå patch-and-minor dependabot grupper.
josstn Jul 24, 2024
c437bea
Bump the patch-and-minor group across 1 directory with 28 updates (#6…
dependabot[bot] Jul 24, 2024
77a994a
Bump uuid from 9.0.1 to 10.0.0 (#6241)
dependabot[bot] Jul 26, 2024
a844d84
Unngå CORS feil i utviklingsmiljø. (#6435)
josstn Aug 1, 2024
c350e39
Bump the patch-and-minor group across 1 directory with 24 updates (#6…
dependabot[bot] Aug 5, 2024
413a129
Bumper pakker (#6445)
hallvardastark Aug 5, 2024
5c4699c
Tillat 12000 tegn i tilbakekrevingsform (#6450)
audunel Aug 7, 2024
c7a7cab
TSFF-644: Resultat settes for tidlig på behandlingene (#6444)
audunel Aug 7, 2024
fe67981
Oppgraderer til eslint 9 (#6428)
josstn Aug 7, 2024
c680b93
Tillat 12000 tegn i revurdering (#6456)
audunel Aug 7, 2024
98f9b94
Venter til etter første render, når behandlingId skal være satt, på å…
hallvardastark Aug 8, 2024
08709af
Unngå javascript feil pga undefined templates i MeldingerSakIndex.tsx…
josstn Aug 8, 2024
e15d320
Reverter til 1500 tegn (#6460)
audunel Aug 8, 2024
b0b4e66
HistorikkEndretFeltType for opphør av refusjon (#6464)
espenjv Aug 9, 2024
b8aada1
Skriver fakta-medlemskap om til typescript (#6317)
hallvardastark Aug 9, 2024
c04d082
TSFF-289: Kunne avslå ekstra omsorgsdager for barn over 18 år (#6463)
audunel Aug 12, 2024
f171b4e
Fiks brevpanel så valgt mottaker viser korrekt etter bytte av mal. (#…
josstn Aug 12, 2024
bfbdc59
Bump paketer (#6470)
hallvardastark Aug 13, 2024
2811c4a
Editorjs fix (#6434)
josstn Aug 13, 2024
d58ac75
Sett ALDERSVILKAR_KRONISK_SYK til true i dev
audunel Aug 13, 2024
304c17f
Legg til ALDERSVILKAR_KRONISK_SYK i featureToggles.json
audunel Aug 13, 2024
61b110a
Viser arbeidsgivernavn i historikk (#6476)
espenjv Aug 14, 2024
8552c70
Sjekk om aldersvilkår finnes på behandling før panel legges til (#6478)
audunel Aug 14, 2024
22d36c6
Bump the patch-and-minor group across 1 directory with 8 updates (#6484)
dependabot[bot] Aug 16, 2024
eecb148
Fjern unødvendige devDependencies i behandling-unntak. (#6488)
josstn Aug 19, 2024
5bce5fa
Juster lint-staged konfigurasjon. (#6483)
josstn Aug 19, 2024
03b2f64
Modernisering feilmeldingskode (#6482)
josstn Aug 19, 2024
c4cc1f4
Bump axios-mock-adapter from 1.22.0 to 2.0.0 (#6449)
dependabot[bot] Aug 19, 2024
acf2d40
Bump @navikt/familie-endringslogg from 12.0.2 to 13.1.1 (#6461)
dependabot[bot] Aug 19, 2024
52c8015
Bump elliptic from 6.5.5 to 6.5.7 (#6487)
dependabot[bot] Aug 19, 2024
089d94f
Refaktor prosess-vilkar overstyring (#6468)
hallvardastark Aug 20, 2024
b061dc8
Bruker felles verdikjedetest workflow (#6495)
qtips Aug 20, 2024
23c23c7
TSFF-633 - fikser typing og skriver bort redux-form i prosess-søknads…
hallvardastark Aug 21, 2024
22ff107
Revert "TSFF-633 - fikser typing og skriver bort redux-form i prosess…
josstn Aug 23, 2024
66e4b7c
Legg til ff og utvid varseltekst (#6514)
audunel Aug 29, 2024
224c350
Konkursvarsel brevsending (#6477)
josstn Aug 30, 2024
81b59ef
Bump the patch-and-minor group across 1 directory with 14 updates (#6…
dependabot[bot] Aug 30, 2024
1a1fbfb
Lag lovdata lenker (#6502)
selbekk Sep 2, 2024
eb89619
Bump micromatch from 4.0.7 to 4.0.8 (#6523)
dependabot[bot] Sep 2, 2024
d364401
Skru på utvidet varseltekst i prod
audunel Sep 2, 2024
1a12b42
TSFF-763: Medlemskap bug (#6527)
hallvardastark Sep 2, 2024
8dd7855
V2 readme (#6510)
josstn Sep 3, 2024
28e2f59
TSFF-775: Legg til felt for privatperson som arbeidsgiver i unntakslø…
audunel Sep 3, 2024
f21aeff
Bump @navikt/k9-sak-typescript-client (#6515)
dependabot[bot] Sep 3, 2024
c0f9ca2
Bumper ft pakker (#6530)
espenjv Sep 3, 2024
c0f6338
TSFF-775: Fiks filter og legg til ff (#6542)
audunel Sep 4, 2024
cf1dd2d
Fiks skrivefeil
audunel Sep 4, 2024
d4141e2
Kompatibiltetsfiks med ny openapi generator (#6543)
josstn Sep 4, 2024
f298bcf
Fikser feil i logikk for aksjonspunkt (#6545)
hallvardastark Sep 4, 2024
43959d0
Forbedring av knapp for overstyring (#6535)
hallvardastark Sep 4, 2024
3ac8655
Fjerner ubrukt panel prosess-vilkar-sokers-opplysningsplikt (#6536)
hallvardastark Sep 4, 2024
90ad342
Lagery story for ap 5020 (#6551)
hallvardastark Sep 5, 2024
eaa8712
Legger til link til brreg.no for å søke fram tredjepartsmottaker. (#6…
josstn Sep 5, 2024
b2e6bef
Forbetra feilhandtering (#6552)
josstn Sep 5, 2024
a2e9d94
Bumper pakker (#6557)
hallvardastark Sep 6, 2024
5e19fb9
Bump postcss in the patch-and-minor group across 1 directory (#6559)
dependabot[bot] Sep 6, 2024
ad1dd99
Update README.md (#6532)
josstn Sep 6, 2024
42f78c0
TSFF-791: Fiks validering slik at privat og org arbeidsgiver ikke beg…
audunel Sep 6, 2024
91b6ea9
Fikser husky script (#6560)
hallvardastark Sep 6, 2024
a68c3dc
aktiver hjemler for oms_ao (#6563)
qtips Sep 6, 2024
5b93b0e
Bump jsdom from 24.1.3 to 25.0.0 (#6562)
dependabot[bot] Sep 10, 2024
9afbe8a
Fix https://github.com/navikt/k9-sak-web/security/dependabot/108 (#6566)
hallvardastark Sep 10, 2024
94266f2
Kodeverk: Tilgjengeliggjøre kodeverk-context (#6569)
thomashwi Sep 10, 2024
b5a0168
Fikser plassering av ikon i endringsloggen (#6574)
hallvardastark Sep 11, 2024
16e4a89
Bump the patch-and-minor group across 1 directory with 20 updates (#6…
dependabot[bot] Sep 11, 2024
1dd6f2d
Bruk nytt skjema basert, med feature toggle (#6578)
audunel Sep 12, 2024
36d4040
Legger inn manglende hjelpetekst (#6579)
hallvardastark Sep 12, 2024
296e0d2
Fjern debug-logging
audunel Sep 12, 2024
4141370
Skru av ff i dev mens backend fikses
audunel Sep 12, 2024
75d7a39
TSFF-535 ny status for feilregistrert klage (#6577)
qtips Sep 13, 2024
6314438
Prosess soknadsfrist 633 (#6507)
hallvardastark Sep 16, 2024
ccd4c77
Bump the patch-and-minor group across 1 directory with 10 updates (#6…
dependabot[bot] Sep 16, 2024
c17e015
TSFF-827 - Visning av opplysninger ved automatisk vurdert medlemskap …
hallvardastark Sep 18, 2024
c1c8563
Bump vite from 5.4.5 to 5.4.6 (#6600)
dependabot[bot] Sep 18, 2024
61049cd
Bump the patch-and-minor group across 1 directory with 13 updates (#6…
dependabot[bot] Sep 18, 2024
10cb5e8
Skru på ff i dev
audunel Sep 18, 2024
f26a317
Vise filter for dokumentliste alltid (#6607)
thomashwi Sep 18, 2024
5e341ab
enable redux dev tools i pre-prod
vebnor Sep 18, 2024
445fb24
TSFF-802 - kan endre avslåtte automatiske vurderinger i søknadsfrist …
hallvardastark Sep 19, 2024
e74b2a8
Bumper pakker (#6609)
hallvardastark Sep 19, 2024
39283e3
Forhindrer at det blir dobbelt opp i prosess-soknadsfrist (#6610)
hallvardastark Sep 19, 2024
b246c02
Toggler av endringer i prosess-soknadsfrist i Q (#6611)
hallvardastark Sep 20, 2024
0335846
Bump the patch-and-minor group with 12 updates (#6613)
dependabot[bot] Sep 23, 2024
5b99e4a
Revert "Toggler av endringer i prosess-soknadsfrist i Q (#6611)" (#6616)
hallvardastark Sep 23, 2024
5f7b22a
Legger inn manglende tekst for historikkinnslag (#6617)
hallvardastark Sep 23, 2024
796933f
utvide cap på endringslogg til vi har noe bedre på plass
vebnor Sep 23, 2024
276e4b3
Bump rollup from 4.18.0 to 4.22.4 (#6621)
dependabot[bot] Sep 24, 2024
d50eb38
Bump the patch-and-minor group with 7 updates (#6618)
dependabot[bot] Sep 24, 2024
3bdefaa
TSFF-743 - refaktorering av prosess-tilkjent-ytelse (#6481)
hallvardastark Sep 24, 2024
48248e9
TSFF-804 & TSFF-486 (#6558)
vebnor Sep 24, 2024
043a29f
TSFF-873: Beholder linjeskift og spacing til visning av saksbehandler…
vebnor Sep 24, 2024
fa9a2e0
Revert "TSFF-804 & TSFF-486 (#6558)" (#6628)
hallvardastark Sep 25, 2024
183343f
Revert "TSFF-743 - refaktorering av prosess-tilkjent-ytelse (#6481)" …
hallvardastark Sep 25, 2024
d812e47
Toggler på visning av detaljer ved automatisk vurdert medlemskap (#6612)
hallvardastark Sep 25, 2024
181bc0c
Revert "Revert "TSFF-804 & TSFF-486 (#6558)" (#6628)" (#6631)
hallvardastark Sep 25, 2024
af5a55c
Revert "Revert "TSFF-743 - refaktorering av prosess-tilkjent-ytelse (…
hallvardastark Sep 25, 2024
3ae1360
Påbegynt ungdomsytelse (#6626)
hallvardastark Sep 25, 2024
055d714
Bump the patch-and-minor group across 1 directory with 16 updates (#6…
dependabot[bot] Sep 25, 2024
90dcf6c
Legger til skjermlenkeCode for medisinsk vilkår (#6636)
thomashwi Sep 25, 2024
d6b0a18
Forsøk på å fikse flaky storybook test (#6630)
hallvardastark Sep 26, 2024
7a60c1d
Sjekker om perioder og medlemskapsperioder er definert (#6633)
hallvardastark Sep 26, 2024
cbdbd79
Bumper pakker (#6638)
hallvardastark Sep 26, 2024
430ef9c
Ikke vis endreknapp for automatisk godkjent institusjon (#6637)
mortenoosvik Sep 26, 2024
9b9ae7a
Rydder i sak-dokumenter (#6553)
hallvardastark Sep 30, 2024
65cab4c
Legger inn sortering av beskrivelser for periode (#6627)
hallvardastark Sep 30, 2024
d994e15
Bumpper fakta beregning med tekstendringer (#6642)
pekern Sep 30, 2024
ed24e59
Sjekker om bruker har lov til å overstyre før vi viser ikon for overs…
hallvardastark Sep 30, 2024
cc7c5e0
Bump the patch-and-minor group across 1 directory with 15 updates (#6…
dependabot[bot] Sep 30, 2024
8438a4d
K9-SAK-WEB-6QV - flytter hook til riktig sted (#6648)
hallvardastark Oct 2, 2024
afba163
Endrer sjekk for om aksjonspunktikon skal vises (#6649)
hallvardastark Oct 2, 2024
c69a4fb
Sjekker om liste er definert før map-funksjon kjører (#6645)
hallvardastark Oct 2, 2024
b8cf78d
Tsff 609 mellomlagring brevtekst (#6419)
josstn Oct 2, 2024
8ef486f
TSFF-890: Viser når opptjening er løst på grunnlag av §8-47 og vi ikk…
vebnor Oct 2, 2024
5b362ca
Overstyr skal kun fungere for perioder som er til vurdering i behandl…
vebnor Oct 2, 2024
f8e110f
TSFF-854 - inngangsvilkår for ungdomsprogrammet (#6651)
hallvardastark Oct 2, 2024
8aac699
K9-SAK-WEB-6QY - sjekker om dato er definert før vi parser (#6654)
hallvardastark Oct 2, 2024
cdffeb6
TSFF-892 - tekstendring (#6656)
hallvardastark Oct 2, 2024
39c0de7
Endrer ikon og justererer alignment i inngangsvilkår (#6653)
hallvardastark Oct 2, 2024
34f9324
Bump the patch-and-minor group across 1 directory with 4 updates (#6655)
dependabot[bot] Oct 3, 2024
1433307
Ikke bruk nytt skjema for 9003 (#6658)
audunel Oct 4, 2024
500f47f
Liten forbedring av fakta-bosted-soker (#6544)
hallvardastark Oct 4, 2024
8ac01a2
Fjern gammelt skjema (#6664)
audunel Oct 4, 2024
168203e
Bump the patch-and-minor group across 1 directory with 15 updates (#6…
dependabot[bot] Oct 7, 2024
772199e
Implementer ny revurderingsflyt med gammel tech (#6659)
selbekk Oct 7, 2024
4caf496
Bump the ft-frontend group with 2 updates (#6668)
dependabot[bot] Oct 8, 2024
eb4cf4f
Ungdomsytelse/beregning (#6652)
hallvardastark Oct 8, 2024
4d39c5d
Revert "Implementer ny revurderingsflyt med gammel tech (#6659)" (#6682)
vebnor Oct 10, 2024
2cbdf80
hotfix/behandlinger-som-skal-godkjennes-pga-8-47-stopper-opp (#6681)
vebnor Oct 10, 2024
60398a3
Reapply "Implementer ny revurderingsflyt med gammel tech (#6659)" (#6…
vebnor Oct 10, 2024
c85279d
Bruk undefined heller enn '' (#6680)
audunel Oct 10, 2024
8b6b70e
Fiks feature toggle mock i tester (#6684)
thomashwi Oct 10, 2024
3e2f8ec
Fjern beskrivelse: '' fra TilkjentYtelseForm (#6686)
audunel Oct 10, 2024
ecf6ee4
Breaking change i AssessedBy + pakkeoppdateringer (#6674)
vebnor Oct 10, 2024
1846699
Legg til toggle for delvis revurdering (#6685)
selbekk Oct 14, 2024
5b0a87f
Bump the patch-and-minor group across 1 directory with 6 updates (#6692)
dependabot[bot] Oct 14, 2024
e794ff6
TSFF-633 - slår på redigering av søknadsfrist i prod (#6689)
hallvardastark Oct 14, 2024
ae70764
ft-fakta-beregning-redesign er merget inn i ft-fakta-beregning (#6693)
hallvardastark Oct 14, 2024
9aeb488
Bump the patch-and-minor group with 5 updates (#6695)
dependabot[bot] Oct 15, 2024
c6e3984
pakkeoppdateringer (#6702)
vebnor Oct 16, 2024
d742cee
Fjerne toggle for overstyring i uttak (#6703)
thomashwi Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

1 change: 0 additions & 1 deletion .eslintrc.cjs

This file was deleted.

22 changes: 8 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,28 @@ updates:
registries:
- npm-github
groups:
patch:
patch-and-minor:
patterns:
- '*'
update-types:
- 'patch'
- 'minor'
exclude-patterns:
- '@storybook/*'
- '@typescript-eslint*'
- 'react*'
- '@types/react'
- '@navikt*'
- 'eslint-plugin-vitest' # version 0.5.4 requires eslint version 9
storybook:
update-types:
- 'major'
patterns:
- 'storybook'
- '@storybook/*'
react:
patterns:
- 'react'
- 'react-dom'
- '@types/react'
typescript-eslint:
patterns:
- '@typescript-eslint*'
storybook:
patterns:
- '@storybook/*'
- 'storybook'
exclude-patterns:
- '@storybook/storybook-deployer'
- '@storybook/testing-react'
- '@storybook/testing-library'
designsystem:
patterns:
- '@navikt/aksel-icons'
Expand Down
188 changes: 117 additions & 71 deletions .github/workflows/deploy-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,21 @@ on:
branches:
- master

env:
TAG_LATEST_PROD: latest_prod
jobs:
# test:
# uses: ./.github/workflows/test.yml
# secrets: inherit

# lint-tscheck-build:
# uses: ./.github/workflows/lint-tscheck-build.yml
# secrets: inherit
# with:
# run-build: false

deploy-docker-image:
name: Deploy Docker image
build-docker-image:
name: Build Docker image
runs-on: ubuntu-latest
permissions:
issues: write
contents: read
id-token: write
# needs: [test, lint-tscheck-build]
outputs:
tag: ${{ steps.docker-push.outputs.tag }}
image: ${{ steps.docker-push.outputs.image }}
steps:
- name: Hente kode
uses: actions/checkout@v4

- name: Setup + Install
uses: ./.github/actions/setup-install
with:
Expand Down Expand Up @@ -61,70 +50,28 @@ jobs:
run: |
echo "IMAGE=${{steps.docker-push.outputs.image}}" >> $GITHUB_OUTPUT
echo "TAG=${{steps.docker-push.outputs.tag}}" >> $GITHUB_OUTPUT

- name: Lukk gamle issues
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: ['deployment']
}).then(response => {
response.data.forEach(issue => {
github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
state: 'closed'
});
});
});

- name: Opprett deployment issue
id: createdeployissue
if: success()
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.create( {
owner: context.issue.owner,
repo: context.issue.repo,
labels: ['deployment'],
body: 'Kommenter enten "/promote dev-fss" eller "/promote prod-fss" for å deploye ${{ github.sha }}',
title: 'Deploy av ${{ steps.docker-push.outputs.tag }}'})
.then(response => {
core.setOutput('number', response.data.number);
});

- name: Trigg deploy til dev-fss
if: success()
uses: actions/github-script@v7
with:
github-token: ${{secrets.GA_P_TOKEN}}
script: |
const issue = { owner: context.issue.owner,
repo: context.issue.repo,
issue_number: ${{ steps.createdeployissue.outputs.number }} }
github.rest.issues.createComment({...issue, body: '/promote dev-fss'})
- name: Git diff url
shell: bash
run: |
dynamic_url="https://github.com/${{ github.repository }}/compare/${{ env.TAG_LATEST_PROD }}...${{ github.sha }}"
echo "Forskjell mellom denne build og prod: <${dynamic_url}>" >> $GITHUB_STEP_SUMMARY

verdikjede-tester:
name: Verdikjedetester
secrets: inherit
permissions:
id-token: write
contents: read
packages: read
uses: navikt/sif-gha-workflows/.github/workflows/verdikjede-test.yml@main
if: github.ref_name == 'master'
needs: deploy-docker-image
uses: navikt/sif-gha-workflows/.github/workflows/verdikjede-test-v2.yml@main
needs: build-docker-image
with:
tag: ${{ needs.deploy-docker-image.outputs.tag }}
frontend_only: 'true'
tag: ${{ needs.build-docker-image.outputs.tag }}
suites: "frontend"
image_version: ${{ needs.build-docker-image.outputs.tag }}

trivy:
needs: [deploy-docker-image]
needs: [build-docker-image]
uses: navikt/sif-gha-workflows/.github/workflows/trivy.yml@main
permissions:
contents: write
Expand All @@ -133,5 +80,104 @@ jobs:
actions: read
secrets: inherit
with:
image: ${{ needs.deploy-docker-image.outputs.image }}
image: ${{ needs.build-docker-image.outputs.image }}
team: k9saksbehandling

deploy-dev:
name: Deploy to dev
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
CLUSTER: dev-fss
environment: dev-fss:k9saksbehandling
needs: [build-docker-image]
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ env.CLUSTER }}
RESOURCE: deploy/${{ env.CLUSTER }}-k9saksbehandling.yml
VARS: deploy/dev.yaml
VAR: image=${{ needs.build-docker-image.outputs.image }}

deploy-prod:
name: Deploy to prod
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
env:
CLUSTER: prod-fss
environment: prod-fss:k9saksbehandling
if: github.ref_name == 'master'
needs: [build-docker-image, deploy-dev, verdikjede-tester, trivy]
steps:
- uses: actions/checkout@v4
with:
# Ta med litt historie og tags for å finne latest_prod commit hash
fetch-tags: true
fetch-depth: 100
- name: tag deployment image tag
uses: actions/github-script@v7
env:
TAG: prod_${{ needs.build-docker-image.outputs.tag }}
with:
script: |
try {
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ env.TAG }}',
sha: context.sha
})
} catch (err) {
if(err.status === 422) { // tag already exists
console.info('Tag for deployment ${{ env.TAG }} already existed. Will leave it as is');
} else {
throw err;
}
}
- name: Print static git diff url
shell: bash
run: |
# disable exit on error temporarily in case latest_prod tag does not exist
set +e
latest_prod_sha="$(git rev-list -n 1 tags/${{ env.TAG_LATEST_PROD }})"
# re-enable exit on error
set -e
if [ -n "${latest_prod_sha}" ]; then
static_url="https://github.com/${{ github.repository }}/compare/${latest_prod_sha}...${{ github.sha }}"
echo "Endringer prodsatt i denne utrulling : <${static_url}>" >> $GITHUB_STEP_SUMMARY
fi
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ env.CLUSTER }}
RESOURCE: deploy/${{ env.CLUSTER }}-k9saksbehandling.yml
VAR: image=${{ needs.build-docker-image.outputs.image }}
- name: tag deployment done
uses: actions/github-script@v7
with:
script: |
try {
await github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/${{ env.TAG_LATEST_PROD }}',
sha: context.sha,
force: true
})
} catch (err) {
if(err.status === 422) { // tag did not exist, try creating it
console.info('Tag for ${{ env.TAG_LATEST_PROD }} did not exist. Will try creating it');
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ env.TAG_LATEST_PROD }}',
sha: context.sha
})
} else {
throw err;
}
}
46 changes: 46 additions & 0 deletions .github/workflows/dev-next1-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and deploy dev-next1
on:
push:
paths-ignore:
- '**.md'
- '.gitignore'
- 'CODEOWNERS'
branches:
- dev-next1

jobs:
build-deploy:
name: Build and deploy Docker image
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
CLUSTER: dev-fss
steps:
- name: Hente kode
uses: actions/checkout@v4

- name: Setup + Install
uses: ./.github/actions/setup-install
with:
npmAuthToken: ${{ secrets.READER_TOKEN }}

- name: Bygge dist
run: yarn build

- name: Build and push to docker registry
uses: nais/docker-build-push@v0
id: docker-push
with:
tag: 'dev-next1'
team: k9saksbehandling
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Deploy to nais
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ env.CLUSTER }}
RESOURCE: deploy/${{ env.CLUSTER }}-k9saksbehandling.yml
VARS: deploy/dev-next1.yaml
VAR: image=${{ steps.docker-push.outputs.image }}
15 changes: 0 additions & 15 deletions .github/workflows/dispatch.yml

This file was deleted.

Loading
Loading