Skip to content

navikt/teamsykmelding-github-actions-workflows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teamsykmelding-github-actions-workflows

This is a repository for GitHub actions workflows for teamsykmelding

🚀 Usage

Deploying a Next application (next-app.yaml)

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

Important:

This reusable workflows make the following assumptions:

  1. There is a Dockerfile on root

    This dockerfile NEEDS to accept the argument ENV (ARG ENV) and copy the following: COPY nais/envs/.env.$ENV /app/.env.production

  2. The naiserator files are in the nais folder, named nais-dev.yaml, nais-demo.yaml and nais-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.

  3. 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.

Deploying a Ktor application (jar-app-21.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

Deploying a Springboot application (boot-jar-app-21.yaml)

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

👥 Contact

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

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published