Skip to content

fjern rebuild av hard deletes tilstand #386

fjern rebuild av hard deletes tilstand

fjern rebuild av hard deletes tilstand #386

name: "Platform: build and deploy"
on:
push:
paths:
- app/**
pull_request:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
jobs:
build:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.10
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRESQL_FSYNC: "off"
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 1337:5432
kafka:
image: docker.io/bitnami/kafka:3.4.1-debian-11-r55
ports:
- 9092:9092
env:
KAFKA_ENABLE_KRAFT: yes
KAFKA_CFG_PROCESS_ROLES: broker,controller
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_BROKER_ID: 0
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: [email protected]:9093
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: true
ALLOW_PLAINTEXT_LISTENER: yes
BITNAMI_DEBUG: true
options: >-
--health-cmd "kafka-broker-api-versions.sh --version"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- run: PGPASSWORD=postgres psql -U postgres -h localhost -p 1337 -f ./local-db-init.sql
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: temurin
cache: maven
- run: mvn -B package
working-directory: app
- uses: nais/docker-build-push@v0
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
id: gar-push
with:
team: fager
tag: ${{ github.sha }}
dockerfile: app/Dockerfile
docker_context: app
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
byosbom: app/target/bom.json
deploy:
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
strategy:
matrix:
cluster:
- dev-gcp
- prod-gcp
app:
- bruker-api
- bruker-api-writer
- produsent-api
- kafka-reaper
- statistikk
- ekstern-varsling
- replay-validator
- kafka-backup
- skedulert-utgaatt
- skedulert-harddelete
- skedulert-paaminnelse
- dataprodukt
#- manuelt-vedlikehold
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- uses: nais/login@v0
id: login
with:
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
team: fager
- uses: nais/deploy/actions/deploy@v2
name: "${{ matrix.cluster }}: deploy ${{ matrix.app }}"
env:
VAR: image=${{ steps.login.outputs.registry }}/arbeidsgiver-notifikasjon-produsent-api:${{ github.sha }}
CLUSTER: ${{ matrix.cluster }}
RESOURCE: app/nais/${{ matrix.cluster }}-${{ matrix.app }}.yaml