Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Fjern debug logging #104

Fjern debug logging

Fjern debug logging #104

Workflow file for this run

name: Build, push and delpoy
on:
push:
branches:
- main
- dev/*
jobs:
build:
name: Test, build, push
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 18
distribution: temurin
cache: gradle
- run: cp .env-example .env
- uses: gradle/gradle-build-action@v2
env:
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: build installDist jar
- run: rm .env
- name: docker-build-push
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: paw
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
deploy-dev:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/dev')
name: Deploy to dev-gcp
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
env:
TEAM: paw
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: nais/nais-dev-gcp.yaml,nais/connector.yaml
REF: ${{ env.COMMIT }}
VAR: image=${{ needs.build.outputs.image }},topic=arbeidssoker-profilert-v2,kafka=dev-gcp,project=paw-dev-129d
deploy-prod:
if: github.ref == 'refs/heads/main'
name: Deploy to prod-gcp
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
env:
TEAM: paw
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: nais/nais-prod-gcp.yaml,nais/connector.yaml
REF: ${{ env.COMMIT }}
VAR: image=${{ needs.build.outputs.image }},topic=arbeidssoker-profilert-v2,kafka=prod-gcp,project=paw-prod-7151
apply-apitoken-unleash:
name: Legger til ApiToken for Unleash
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: deploy to dev
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: nais/unleash-apitoken-dev.yaml
- name: deploy to prod
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: nais/unleash-apitoken-prod.yaml