Giter Club home page Giter Club logo

teamesyfo-github-actions-workflows's Introduction

teamesyfo-github-actions-workflows

This is a repository for GitHub actions workflows for teamesyfo

๐Ÿš€ 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 a new github workflow `deploy-app.yaml` with the following:
name: Build & Deploy
on: push

jobs:
  next-app:
    uses: navikt/teamesyfo-github-actions-workflows/.github/workflows/next-app.yaml@main
    secrets: inherit
    with:
      app: REPLACE_ME
      base-path: REPLACE_ME

Add the secondary demo-delete.yaml with the following:

name: Demo delete
on: delete

jobs:
  branch-delete:
    uses: navikt/teamesyfo-github-actions-workflows/.github/workflows/next-app-demo-delete.yaml@main
    secrets: inherit
    with:
      app: REPLACE_ME
      base-path: REPLACE_ME

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 must be 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: team-esyfo
      labels:
        team: team-esyfo
        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 or Spring Boot application (jar-app.yaml)

Detailed instructions

1. Add a new github workflow deploy-app.yaml with the following:

name: Build & Deploy
on: push

jobs:
   jar-app:
      uses: navikt/teamesyfo-github-actions-workflows/.github/workflows/jar-app.yaml@main
      secrets: inherit
      with:
         app: REPLACE_ME

2. The naiserator files must be in the nais folder, named nais-dev.yaml and nais-prod.yaml.

๐Ÿ‘ฅ Contact

This project is maintained by navikt/team-esyfo

If you work in @navikt you can reach us at the Slack channel #esyfo

teamesyfo-github-actions-workflows's People

Contributors

audunsorheim avatar dependabot[bot] avatar kaja-nav avatar karl-run avatar luantr avatar mikaojk avatar rannveigskjerve avatar

Watchers

 avatar  avatar

Forkers

rannveigskjerve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.