Skip to content

Commit

Permalink
Merge branch 'master' into feature/skattekort-service
Browse files Browse the repository at this point in the history
  • Loading branch information
krharum committed Jun 6, 2024
2 parents bae5eec + 3e4751e commit 2024134
Show file tree
Hide file tree
Showing 489 changed files with 7,573 additions and 3,033 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"
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"
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
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
1 change: 1 addition & 0 deletions .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
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
3 changes: 2 additions & 1 deletion .github/workflows/kafka-topics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
jobs:
deploy-kafka-topics-dev:
name: Deploy to Aiven Dev
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -22,4 +23,4 @@ jobs:
env:
CLUSTER: dev-gcp
VAR: kafka-pool=nav-dev
RESOURCE: .nais/topics.yml
RESOURCE: ".nais/topics.yml"
1 change: 1 addition & 0 deletions .github/workflows/lib.integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
workflow:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/common.workflow.libs.backend.yml
with:
working-directory: 'libs/integration-test'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maskinporten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: .nais/maskinporten.yml
RESOURCE: ".nais/maskinporten.yml"
2 changes: 1 addition & 1 deletion .github/workflows/opensearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/opensearch.yml
RESOURCE: ".nais/opensearch.yml"
43 changes: 43 additions & 0 deletions .github/workflows/pages-build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: GitHub Pages

on:
push:
branches: ["master"]
paths:
- "docs/**"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure
uses: actions/configure-pages@v5
- name: Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload
uses: actions/upload-pages-artifact@v3
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/redis-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/redis-dev.yml
RESOURCE: ".nais/redis-dev.yml"
2 changes: 1 addition & 1 deletion .github/workflows/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/redis.yml
RESOURCE: ".nais/redis.yml"
Loading

0 comments on commit 2024134

Please sign in to comment.