Fix 404 exception handler #444
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build-Deploy-Main-Pipelines | |
on: | |
push: | |
branches: | |
- 'main' | |
paths-ignore: | |
- '**.md' | |
- '**/**.md' | |
permissions: | |
contents: "write" | |
id-token: "write" | |
jobs: | |
bygg-app-main: | |
name: Bygg app/image, push til github | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
cache: 'maven' | |
- name: Build with maven | |
run: mvn install --file pom.xml | |
- name: Dependency submission (for dependabot) | |
uses: advanced-security/maven-dependency-submission-action@v4 | |
- name: Build and push Docker image | |
uses: nais/docker-build-push@v0 | |
id: docker-build-push | |
with: | |
team: teamserviceklage | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
image_suffix: prod | |
byosbom: target/bom.json | |
outputs: | |
image: ${{ steps.docker-build-push.outputs.image }} | |
deploy-main: | |
name: Deploy to main | |
needs: [bygg-app-main] | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Deploy | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
PRINT_PAYLOAD: true | |
CLUSTER: prod-gcp | |
RESOURCE: .nais/nais.yml | |
VARS: .nais/p-config.json | |
DRY_RUN: false | |
VAR: image=${{needs.bygg-app-main.outputs.image}} | |
deploy-alerts-prod: | |
name: Deploy alerts to prod | |
needs: [deploy-main] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Deploy to prod | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: prod-gcp | |
RESOURCE: .nais/alerts.yml | |
VARS: .nais/prod-alert.json |