This is a repository for GitHub actions workflows for teamsykmelding
Builds 1 app per environment. Supports deploying demo-prefixed branches to their own ingress.
Detailed instructions
Add the main `deploy.yaml` with the following:name: Build & Deploy
on: push
jobs:
next-app:
uses: navikt/teamsykmelding-github-actions-workflows/.github/workflows/next-app.yaml@main
secrets: inherit
with:
app: sykmeldinger
base-path: /syk/sykmeldinger
Add the secondary demo-delete.yaml
with the following:
name: Demo delete
on: delete
jobs:
branch-delete:
uses: navikt/teamsykmelding-github-actions-workflows/.github/workflows/next-app-demo-delete.yaml@main
secrets: inherit
with:
app: dinesykmeldte
base-path: /arbeidsgiver/sykmeldte
This reusable workflows make the following assumptions:
-
There is a
Dockerfile
on rootThis dockerfile NEEDS to accept the argument
ENV
(ARG ENV
) and copy the following:COPY nais/envs/.env.$ENV /app/.env.production
-
The naiserator files are in the
nais
folder, namednais-dev.yaml
,nais-demo.yaml
andnais-prod.yaml
.The
nais.demo.yaml
needs to be parameterized with the following:apiVersion: 'nais.io/v1alpha1' kind: 'Application' metadata: name: {{appname}}-demo namespace: teamsykmelding labels: team: teamsykmelding branchState: {{branchState}} spec: image: {{image}} port: 3000 ingresses: - {{ingress}} replicas: min: {{replicas}} max: {{replicas}}
This is to support deploying branches to their own ingress.
-
There needs to be a
nais/envs
folder with the following files:.env.dev
,.env.demo
,.env.prod
. These envs will be available both during build and runtime.Note: Normal runtime-only (e.g. backend-only) envs can still be added in the nais.yaml.
Detailed instructions
Add the main `deploy.yaml` with the following:name: Deploy to dev and prod
on: push
permissions:
actions: read
contents: write
security-events: write
packages: write
id-token: write
jobs:
jar-app:
uses: navikt/teamsykmelding-github-actions-workflows/.github/workflows/jar-app-21.yaml@main
secrets: inherit
with:
app: macgyver
Detailed instructions
Add the main `deploy.yaml` with the following:name: Deploy app to dev and prod
on: push
permissions:
actions: read
contents: write
security-events: write
packages: write
id-token: write
jobs:
jar-app:
uses: navikt/teamsykmelding-github-actions-workflows/.github/workflows/boot-jar-app-21.yaml@main
secrets: inherit
with:
app: syk-dig-backend
This project is maintained by navikt/teamsykmelding
Questions and/or feature requests? Please create a pull request
If you work in @navikt you can reach us at the Slack channel #team-sykmelding