Skip to content

Commit

Permalink
[KAIZEN-0] fjern prod-fss
Browse files Browse the repository at this point in the history
  • Loading branch information
abrhanav committed Jul 5, 2024
1 parent a10caf6 commit a623793
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 260 deletions.
79 changes: 0 additions & 79 deletions .github/workflows/gcp.yaml

This file was deleted.

124 changes: 70 additions & 54 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,77 @@
name: Build, push, and deploy

on: [push]
on: [ push ]

env:
CI: true
TZ: Europe/Oslo
CI: true
TZ: Europe/Oslo

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
id-token: write
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
registry-url: https://npm.pkg.github.com
- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Publish Docker image
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master'
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: personoversikt
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
build:
name: Build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
id-token: write
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
registry-url: https://npm.pkg.github.com
- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Publish Docker image
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master'
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: personoversikt
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}

deploy-prod:
name: Deploy to prod
needs: build
if: github.ref == 'refs/heads/master'
environment: prod-fss
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v2
env:
PRINT_PAYLOAD: true
CLUSTER: prod-fss
RESOURCE: .nais/prod.yaml
VAR: version=${{ github.sha }},image=${{ needs.build.outputs.image }}
deploy-qa:
name: Deploy to preprod
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
PRINT_PAYLOAD: true
CLUSTER: dev-gcp
RESOURCE: .nais/dev.yaml
VAR: version=${{ github.sha }},image=${{ needs.build.outputs.image }}

deploy-prod:
name: Deploy to prod
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
PRINT_PAYLOAD: true
CLUSTER: prod-gcp
RESOURCE: .nais/prod.yaml
VAR: version=${{ github.sha }},image=${{ needs.build.outputs.image }}
20 changes: 2 additions & 18 deletions .github/workflows/unleash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- .nais/unleash/**
- .github/workflows/unleash.yml
jobs:
deploy-unleash-api-token-to-dev-gcp:
deploy-unleash-api-token-to-dev:
if: github.ref == 'refs/heads/dev'
name: Deploy unleash api-token to dev-gcp
runs-on: ubuntu-latest
Expand All @@ -21,7 +21,7 @@ jobs:
CLUSTER: dev-gcp
RESOURCE: .nais/unleash/unleash-apitoken-preprod.yaml

deploy-unleash-api-token-to-prod-gcp:
deploy-unleash-api-token-to-prod:
if: github.ref == 'refs/heads/master'
name: Deploy unleash api-token to prod-gcp
runs-on: ubuntu-latest
Expand All @@ -36,19 +36,3 @@ jobs:
env:
CLUSTER: prod-gcp
RESOURCE: .nais/unleash/unleash-apitoken-prod.yaml

deploy-unleash-api-token-to-prod:
if: github.ref == 'refs/heads/master'
name: Deploy unleash api-token to prod-fss
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy unleash api token
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-fss
RESOURCE: .nais/unleash/unleash-apitoken-prod.yaml
80 changes: 0 additions & 80 deletions .nais/prod-gcp.yaml

This file was deleted.

Loading

0 comments on commit a623793

Please sign in to comment.