Skip to content

Commit

Permalink
Fikset merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
betsytraran committed Jun 19, 2024
2 parents b31e56d + 329613b commit 915e2e5
Show file tree
Hide file tree
Showing 712 changed files with 18,974 additions and 11,195 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/alert-dolly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
apply-alerts:
name: Apply alerts to cluster
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -18,4 +19,4 @@ jobs:
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/alerting-dolly.yml
RESOURCE: ".nais/alerting-dolly.yml"
7 changes: 3 additions & 4 deletions .github/workflows/app.dolly-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ on:
- libs/security-core
- apps/dolly-frontend/**
- .github/workflows/app.dolly-frontend.yml
- .github/workflows/common.cypress.yml
- .github/workflows/common.playwright.yml

jobs:

cypress:
uses: ./.github/workflows/common.cypress.yml
playwright:
uses: ./.github/workflows/common.playwright.yml
with:
working-directory: "apps/dolly-frontend"
secrets:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/app.team-dolly-lokal-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
deploy:
name: Deploy team-dolly-lokal-app
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -18,4 +19,4 @@ jobs:
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/team-dolly-lokal-app.yml
RESOURCE: ".nais/team-dolly-lokal-app.yml"
33 changes: 0 additions & 33 deletions .github/workflows/common.cypress.yml

This file was deleted.

16 changes: 9 additions & 7 deletions .github/workflows/common.integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
java-version: 21
distribution: 'temurin'
- name: "Gradle"
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: "Build"
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
uses: gradle/gradle-build-action@v2
with:
arguments: assemble --scan
cache-read-only: false
run: ./gradlew assemble --scan
- name: "Start docker containers"
run: |
JWK=$(cat ./mocks/jwk.json) docker-compose up -d --build
Expand All @@ -43,11 +44,12 @@ jobs:
echo Wait on service...
bash -c 'while [[ "$(curl --connect-timeout 2 -s -o /dev/null -w ''%{http_code}'' ${{ inputs.healthcheck }})" != "200" ]]; do echo ...; sleep 5; done; echo Service is up;'
- name: "Run integration tests"
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: ${{ inputs.working-directory }}
arguments: iTest --scan
cache-read-only: false
- name: "Build"
working-directory: ${{ inputs.working-directory }}
run: ./gradlew iTest --scan
- name: "Stop docker containers"
run: |
docker-compose down -v --remove-orphans
38 changes: 38 additions & 0 deletions .github/workflows/common.playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Playwright Tests
on:
workflow_call:
inputs:
working-directory:
type: string
description: "The working directory for the job, e.g. apps/dolly-frontend (without leading/trailing slash)."
required: true
secrets:
READER_TOKEN:
required: true
jobs:
playwright-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [ 1, 2, 3, 4, 5 ]
shardTotal: [ 5 ]
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://npm.pkg.github.com/
scope: "@navikt"
- name: Install dependencies
working-directory: ${{ inputs.working-directory }}/src/main/js
run: npm ci
- name: Install Playwright Browsers
working-directory: ${{ inputs.working-directory }}/src/main/js
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ${{ inputs.working-directory }}/src/main/js
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
16 changes: 9 additions & 7 deletions .github/workflows/common.workflow.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ on:
jobs:

start:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Logging"
Expand Down Expand Up @@ -83,11 +84,12 @@ jobs:
java-version: 21
- name: "Gradle"
id: gradle
uses: gradle/gradle-build-action@v3
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: ${{ inputs.working-directory }}
arguments: build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || ''}} --scan
cache-read-only: false
- name: "Build"
working-directory: ${{ inputs.working-directory }}
run: ./gradlew build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || ''}} --scan
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down Expand Up @@ -115,7 +117,7 @@ jobs:
image: ${{ steps.docker-build-push.outputs.image }}

deploy:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy == 'true'
concurrency: ${{ inputs.image-suffix }}
runs-on: ubuntu-latest
Expand All @@ -126,11 +128,11 @@ jobs:
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ inputs.cluster }}
RESOURCE: ${{ inputs.working-directory }}/${{ inputs.nais-manifest }}
RESOURCE: "${{ inputs.working-directory }}/${{ inputs.nais-manifest }}"
VAR: image=${{ needs.build.outputs.image }}

deploy-test:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy-test == 'true'
concurrency: ${{ inputs.image-suffix }}-test
runs-on: ubuntu-latest
Expand All @@ -141,5 +143,5 @@ jobs:
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ inputs.cluster }}
RESOURCE: ${{ inputs.working-directory }}/config.test.yml
RESOURCE: "${{ inputs.working-directory }}/config.test.yml"
VAR: image=${{ needs.build.outputs.image }}
27 changes: 16 additions & 11 deletions .github/workflows/common.workflow.frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ on:
jobs:

start:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Logging"
Expand Down Expand Up @@ -115,14 +116,18 @@ jobs:
java-version: 21
- name: "Gradle"
id: gradle
uses: gradle/gradle-build-action@v3
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: ${{ inputs.working-directory }}
arguments: build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || '' }} --scan
cache-read-only: false
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: "Build"
working-directory: ${{ inputs.working-directory }}
run: ./gradlew build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || '' }} --scan
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: "Reporting"
if: failure() && steps.gradle.outcome == 'failure'
uses: actions/upload-artifact@v4
Expand All @@ -149,7 +154,7 @@ jobs:
image: ${{ steps.docker-build-push.outputs.image }}

deploy:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy == 'true'
concurrency: ${{ inputs.image-suffix }}
runs-on: ubuntu-latest
Expand All @@ -160,11 +165,11 @@ jobs:
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ inputs.cluster }}
RESOURCE: ${{ inputs.working-directory }}/config.yml
RESOURCE: "${{ inputs.working-directory }}/config.yml"
VAR: image=${{ needs.build.outputs.image }}

deploy-test:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy-test == 'true'
concurrency: ${{ inputs.image-suffix }}-test
runs-on: ubuntu-latest
Expand All @@ -175,12 +180,12 @@ jobs:
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ inputs.cluster }}
RESOURCE: ${{ inputs.working-directory }}/config.test.yml
RESOURCE: "${{ inputs.working-directory }}/config.test.yml"
VAR: image=${{ needs.build.outputs.image }}

# Only used by dolly-frontend.
deploy-idporten:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy-idporten == 'true'
concurrency: ${{ inputs.image-suffix }}-idporten
runs-on: ubuntu-latest
Expand All @@ -191,12 +196,12 @@ jobs:
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ inputs.cluster }}
RESOURCE: ${{ inputs.working-directory }}/config.idporten.yml
RESOURCE: "${{ inputs.working-directory }}/config.idporten.yml"
VAR: image=${{ needs.build.outputs.image }}

# Only used by dolly-frontend.
deploy-unstable:
needs: [start, build]
needs: [ start, build ]
if: needs.start.outputs.do-deploy-unstable == 'true'
concurrency: ${{ inputs.image-suffix }}-unstable
runs-on: ubuntu-latest
Expand All @@ -207,5 +212,5 @@ jobs:
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ inputs.cluster }}
RESOURCE: ${{ inputs.working-directory }}/config.unstable.yml
RESOURCE: "${{ inputs.working-directory }}/config.unstable.yml"
VAR: image=${{ needs.build.outputs.image }}
8 changes: 5 additions & 3 deletions .github/workflows/common.workflow.libs.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
jobs:

start:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Logging"
Expand Down Expand Up @@ -46,11 +47,12 @@ jobs:
java-version: 21
- name: "Gradle"
id: gradle
uses: gradle/gradle-build-action@v3
uses: gradle/actions/setup-gradle@v3
with:
build-root-directory: ${{ inputs.working-directory }}
arguments: build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || '' }} --scan
cache-read-only: false
- name: "Build"
working-directory: ${{ inputs.working-directory }}
run: ./gradlew build ${{ inputs.sonar-enabled && 'jacocoTestReport sonar -Dsonar.gradle.skipCompile=true' || '' }} --scan
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/common.workflow.libs.frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
jobs:

start:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Logging"
Expand Down Expand Up @@ -48,7 +49,7 @@ jobs:
if: |
(github.ref == 'refs/heads/master' || contains(github.event.head_commit.message, '#publish-libs')) &&
(!contains(github.event.head_commit.message, '[skip ci]'))
run: npm publish
run: npm version patch && npm publish
working-directory: ${{ inputs.working-directory }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/idporten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
deploy-idporten:
if: github.event.pull_request.draft == false
name: Deploy idporten
runs-on: ubuntu-latest
permissions:
Expand All @@ -19,4 +20,4 @@ jobs:
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: .nais/idporten.yml
RESOURCE: ".nais/idporten.yml"
14 changes: 9 additions & 5 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ on:
push:
branches:
- master
paths-ignore:
- 'navikt/**'
- '.github/**'
- '.nais/alerting-dolly.yml'
paths:
- 'apps/bruker-service/**'
- 'apps/person-organisasjon-tilgang-service/**'
pull_request:
types: [ assigned, opened, synchronize, reopened ]
paths:
- 'apps/bruker-service/**'
- 'apps/person-organisasjon-tilgang-service/**'
types: [ ready_for_review, review_requested ]
workflow_dispatch:

jobs:
bruker-service:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/common.integration-test.yml
with:
working-directory: 'apps/bruker-service/'
healthcheck: 'http://localhost:8002/internal/isAlive'
secrets:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
person-organisasjon-tilgang-service:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/common.integration-test.yml
with:
working-directory: 'apps/person-organisasjon-tilgang-service/'
Expand Down
Loading

0 comments on commit 915e2e5

Please sign in to comment.