Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
enstulen committed Oct 4, 2023
1 parent 9b26028 commit 4cd2813
Show file tree
Hide file tree
Showing 114 changed files with 5,128 additions and 6,125 deletions.
35 changes: 16 additions & 19 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals",
"prettier",
"plugin:cypress/recommended"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"warn",
{ "ignoreRestSiblings": true }
],
"cypress/no-unnecessary-waiting": "warn"
}
}
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals",
"prettier",
"plugin:cypress/recommended"
],
"rules": {
"@typescript-eslint/no-unused-vars": ["warn", { "ignoreRestSiblings": true }],
"cypress/no-unnecessary-waiting": "warn"
}
}
28 changes: 14 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "monthly"
interval: 'monthly'
open-pull-requests-limit: 20
groups:
all-minor-patch:
patterns:
- "*"
- '*'
update-types:
- "minor"
- "patch"
- 'minor'
- 'patch'

- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "monthly"
interval: 'monthly'
groups:
all:
patterns:
- "*"
- package-ecosystem: "docker"
directory: "/"
- '*'

- package-ecosystem: 'docker'
directory: '/'
schedule:
interval: "monthly"
interval: 'monthly'
4 changes: 2 additions & 2 deletions .github/workflows/alert-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
paths:
- '.nais/alerts.yml'
- '.github/workflows/alert-deploy.yml'

jobs:
apply-alerts-prod:
name: Apply alerts to prod
Expand Down Expand Up @@ -45,4 +45,4 @@ jobs:
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .nais/alerts-preprod.yml
RESOURCE: .nais/alerts-preprod.yml
18 changes: 9 additions & 9 deletions .github/workflows/auto-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Autodeployment
run-name: Autodeploy til prod (hver mandag)
on:
schedule:
- cron: '0 08 * * 1' # kl 09 hver mandag
schedule:
- cron: '0 08 * * 1' # kl 09 hver mandag

jobs:
build-push-deploy-main:
uses: ./.github/workflows/main.yml
secrets: inherit
permissions:
contents: "read"
id-token: "write"
packages: "read"
build-push-deploy-main:
uses: ./.github/workflows/main.yml
secrets: inherit
permissions:
contents: 'read'
id-token: 'write'
packages: 'read'
93 changes: 45 additions & 48 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,48 @@
name: Build and push Docker container
on:
workflow_call:
outputs:
image:
description: "The docker image"
value: ${{ jobs.build-and-push.outputs.image }}
inputs:
environment:
required: true
type: string
on:
workflow_call:
outputs:
image:
description: 'The docker image'
value: ${{ jobs.build-and-push.outputs.image }}
inputs:
environment:
required: true
type: string

jobs:
build-and-push:
name: Build and push Docker container
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
packages: "read"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.8.0'
registry-url: https://npm.pkg.github.com
scope: "@navikt"
cache: "npm"
- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set environment variables
run: cp environments/${{ inputs.environment }}.env .env
- name: Build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: npm run build
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: team-soknad
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
image_suffix: ${{ inputs.environment }}
outputs:
image: ${{ steps.docker-build-push.outputs.image }}



build-and-push:
name: Build and push Docker container
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
packages: 'read'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.8.0'
registry-url: https://npm.pkg.github.com
scope: '@navikt'
cache: 'npm'
- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set environment variables
run: cp environments/${{ inputs.environment }}.env .env
- name: Build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: npm run build
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: team-soknad
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
image_suffix: ${{ inputs.environment }}
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
54 changes: 27 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@ on:
workflow_call:

jobs:
build-and-test:
name: Test frontend
uses: ./.github/workflows/test.yml
build-and-test:
name: Test frontend
uses: ./.github/workflows/test.yml

build-and-push:
name: Build and push Docker container for prod
uses: ./.github/workflows/build-push.yml
with:
environment: prod
secrets: inherit
permissions:
contents: "read"
id-token: "write"
packages: "read"
build-and-push:
name: Build and push Docker container for prod
uses: ./.github/workflows/build-push.yml
with:
environment: prod
secrets: inherit
permissions:
contents: 'read'
id-token: 'write'
packages: 'read'

deploy-prod:
name: Deploy to prod
needs: [build-and-test, build-and-push]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
DRY_RUN: false
PRINT_PAYLOAD: true
CLUSTER: prod-gcp
RESOURCE: .nais/nais.yml
VAR: app_version=${{ github.sha }},image=${{ needs.build-and-push.outputs.image }}
deploy-prod:
name: Deploy to prod
needs: [build-and-test, build-and-push]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
DRY_RUN: false
PRINT_PAYLOAD: true
CLUSTER: prod-gcp
RESOURCE: .nais/nais.yml
VAR: app_version=${{ github.sha }},image=${{ needs.build-and-push.outputs.image }}
52 changes: 26 additions & 26 deletions .github/workflows/manual-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Manually triggered deployment
run-name: Manual deploy to ${{ inputs.environment }} [${{ github.ref_name }}]
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy'
required: true
default: 'preprod'
type: choice
options:
- preprod
- preprod-alt
- prod
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy'
required: true
default: 'preprod'
type: choice
options:
- preprod
- preprod-alt
- prod
permissions:
contents: "read"
id-token: "write"
packages: "read"
contents: 'read'
id-token: 'write'
packages: 'read'

jobs:
preprod:
if: inputs.environment == 'preprod'
uses: ./.github/workflows/preprod.yml
secrets: inherit
preprod:
if: inputs.environment == 'preprod'
uses: ./.github/workflows/preprod.yml
secrets: inherit

preprod-alt:
if: inputs.environment == 'preprod-alt'
uses: ./.github/workflows/preprod-alt.yml
secrets: inherit
preprod-alt:
if: inputs.environment == 'preprod-alt'
uses: ./.github/workflows/preprod-alt.yml
secrets: inherit

prod:
if: inputs.environment == 'prod'
uses: ./.github/workflows/main.yml
secrets: inherit
prod:
if: inputs.environment == 'prod'
uses: ./.github/workflows/main.yml
secrets: inherit
54 changes: 27 additions & 27 deletions .github/workflows/preprod-alt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ name: Build, push, and deploy (preprod-alt)
on: workflow_call

jobs:
build-and-test:
name: Test frontend
uses: ./.github/workflows/test.yml
build-and-test:
name: Test frontend
uses: ./.github/workflows/test.yml

build-and-push:
name: Build and push Docker container for preprod
uses: ./.github/workflows/build-push.yml
with:
environment: preprod-alt
secrets: inherit
permissions:
contents: "read"
id-token: "write"
packages: "read"
build-and-push:
name: Build and push Docker container for preprod
uses: ./.github/workflows/build-push.yml
with:
environment: preprod-alt
secrets: inherit
permissions:
contents: 'read'
id-token: 'write'
packages: 'read'

deploy-preprod:
name: Deploy to preprod-alt
needs: [build-and-test, build-and-push]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
DRY_RUN: false
PRINT_PAYLOAD: true
CLUSTER: dev-gcp
RESOURCE: .nais/nais-preprod-alt.yml
VAR: app_version=${{ github.sha }},image=${{ needs.build-and-push.outputs.image }}
deploy-preprod:
name: Deploy to preprod-alt
needs: [build-and-test, build-and-push]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
DRY_RUN: false
PRINT_PAYLOAD: true
CLUSTER: dev-gcp
RESOURCE: .nais/nais-preprod-alt.yml
VAR: app_version=${{ github.sha }},image=${{ needs.build-and-push.outputs.image }}
Loading

0 comments on commit 4cd2813

Please sign in to comment.