Skip to content

fix. Degradere logging til warn (#1100) #718

fix. Degradere logging til warn (#1100)

fix. Degradere logging til warn (#1100) #718

name: Bygg og deploy master
on:
push:
branches:
- 'master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
IMAGE: ghcr.io/${{ github.repository }}/tiltaksgjennomforing-api:${{ github.sha }}
jobs:
bygg:
permissions:
packages: write
name: Bygg
runs-on: ubuntu-latest
steps:
- name: Sjekk ut kode
uses: actions/checkout@v3
- name: Oppsett Java 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: maven
- name: Bygg og test med Maven
run: mvn package -B -Dsurefire.useFile=false
- name: Bygg, tag og push Docker-image
run: |
echo ${GITHUB_TOKEN} | docker login ghcr.io -u ${GITHUB_REPOSITORY} --password-stdin
docker build --tag ${IMAGE} .
docker push ${IMAGE}
deploy-dev:
name: Deploy til dev
runs-on: ubuntu-latest
needs: bygg
steps:
- name: Sjekk ut kode
uses: actions/checkout@v3
- name: Deploy til dev-fss
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-fss
RESOURCE: nais/dev-fss.yaml,nais/unleash-apitoken.yml
PRINT_PAYLOAD: true
VAR: unleash-environment=development
deploy-prod:
name: Deploy til prod
runs-on: ubuntu-latest
needs: bygg
steps:
- name: Sjekk ut kode
uses: actions/checkout@v3
- name: Deploy til prod-fss
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-fss
RESOURCE: nais/prod-fss.yaml,nais/alerterator.yaml,nais/unleash-apitoken.yml
PRINT_PAYLOAD: true
VAR: unleash-environment=production
deploy-gcp-labs:
name: Deploy til gcp (gamle labs)
runs-on: ubuntu-latest
needs: bygg
steps:
- name: Sjekk ut kode
uses: actions/checkout@v3
- name: Generer tiltaksgjennomforing-wiremock configmap
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
./kubectl create configmap --dry-run=client -o yaml --from-file src/test/resources/mappings -n arbeidsgiver tiltaksgjennomforing-wiremock > nais/wiremock-mappings.yaml
cat nais/wiremock-mappings.yaml # debug
- name: Deploy til gcp
uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: nais/dev-gcp-labs.yaml,nais/wiremock.yaml,nais/wiremock-mappings.yaml
PRINT_PAYLOAD: true
VAR: deploytrigger=${{ github.run_number }}