Skip to content

Commit

Permalink
Merge branch 'main' into fix/delegation-notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
magnearun authored Mar 3, 2025
2 parents 6205b65 + b81e548 commit 03b6d5d
Show file tree
Hide file tree
Showing 518 changed files with 11,886 additions and 2,405 deletions.
23 changes: 9 additions & 14 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,19 @@ codemagic.yaml
/libs/dokobit-signing/ @island-is/kolibri-justice-league
/libs/email-service/ @island-is/kolibri-justice-league

/apps/financial-aid/ @island-is/kolibri-robin-hood
/libs/financial-aid/ @island-is/kolibri-robin-hood
/libs/next-ids-auth/ @island-is/kolibri-robin-hood
/libs/clients/rsk/personal-tax-return @island-is/kolibri-robin-hood
/libs/api/domains/municipalities-financial-aid @island-is/kolibri-robin-hood
/libs/clients/municipalities-financial-aid @island-is/kolibri-robin-hood
# No active contract.
# /apps/financial-aid/ @island-is/kolibri-robin-hood
# /libs/financial-aid/ @island-is/kolibri-robin-hood
# /libs/next-ids-auth/ @island-is/kolibri-robin-hood
# /libs/clients/rsk/personal-tax-return @island-is/kolibri-robin-hood
# /libs/api/domains/municipalities-financial-aid @island-is/kolibri-robin-hood
# /libs/clients/municipalities-financial-aid @island-is/kolibri-robin-hood

/apps/download-service/ @island-is/hugsmidjan
/apps/portals/my-pages*/ @island-is/hugsmidjan
/apps/services/regulations-admin-backend/ @island-is/hugsmidjan
/apps/services/user-profile/ @island-is/hugsmidjan @island-is/juni @island-is/aranja
/apps/web/components/Grant/ @island-is/hugsmidjan
/apps/web/components/Grants/ @island-is/hugsmidjan
/apps/web/components/GrantCardsList/ @island-is/hugsmidjan
/apps/web/screens/Grants/ @island-is/hugsmidjan
/apps/web/screens/Regulations/ @island-is/hugsmidjan
Expand Down Expand Up @@ -312,10 +313,7 @@ codemagic.yaml
/libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/ @island-is/deloitte
/libs/clients/mms/frigg @island-is/deloitte

/apps/services/auth/ids-api/ @island-is/fuglar @island-is/aranja
/apps/services/auth/admin-api/ @island-is/fuglar @island-is/aranja
/apps/services/auth/public-api/ @island-is/fuglar @island-is/aranja
/apps/services/auth/delegation-api/ @island-is/fuglar @island-is/aranja
/apps/services/auth/ @island-is/fuglar @island-is/aranja
/apps/services/sessions/ @island-is/fuglar @island-is/aranja
/apps/auth-admin-web/ @island-is/fuglar @island-is/aranja
/libs/auth-api-lib/ @island-is/fuglar @island-is/aranja
Expand All @@ -325,9 +323,6 @@ codemagic.yaml
/libs/application/template-api-modules/src/lib/modules/templates/european-health-insurance-card/ @island-is/fuglar
/libs/clients/ehic-client-v1 @island-is/fuglar

/apps/services/auth/personal-representative/ @island-is/programm @island-is/aranja
/apps/services/auth/personal-representative-public/ @island-is/programm @island-is/aranja

/libs/application/templates/criminal-record/ @island-is/origo
/libs/application/template-api-modules/src/lib/modules/templates/criminal-record-submission/ @island-is/origo
/libs/api/domains/criminal-record/ @island-is/origo
Expand Down
61 changes: 61 additions & 0 deletions .github/actions/update-helm-values/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 'Update helm-values charts'
description: 'Copys the changeset in charts folder to helm-values repository'

inputs:
files:
description: 'Comma seperated string of paths to copy'
default: ''
required: false
ssh-key:
description: 'SSH key so the action can fetch and push to the helm-values repository'
required: true
app-id:
description: 'App ID for the GitHub App'
required: true

runs:
using: 'composite'
steps:
- name: Get token
id: get-token
shell: bash
env:
APP_ID: ${{ inputs.app-id }}
PRIVATE_KEY: ${{ inputs.ssh-key }}
run: |
node scripts/ci/docker/get-github-token.mjs
- name: Checkout helm-values repository
uses: actions/checkout@v4
with:
repository: island-is/helm-values
ref: main
token: ${{ steps.get-token.outputs.token }}
path: helm-values
- name: Copy affected helm charts from island.is repository to helm-values repository
shell: bash
env:
files: ${{ inputs.files }}
run: |
IFS=$IFS,
paths=()
read -a paths <<< $files
echo "$files\n$paths"
for path in ${paths[@]}; do
export DEST="helm-values/helm-values/${path#charts/}"
export DEST_PATH=$(dirname $DEST)
mkdir -p $DEST_PATH
echo "Copying filepath: ${path} to $DEST"
cp "$path" "$DEST"
done
- name: Commit and push changes to helm-values repository
if: ${{ inputs.files != '' }}
shell: bash
run: |
cd helm-values
git config --global user.email "[email protected]"
git config --global user.name "CI Bot"
git add .
git commit -m "Updated helm charts"
echo "Showing changeset\n $(git show)"
git push
83 changes: 75 additions & 8 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
name: 'Prep Dependencies'
on:
workflow_call:
inputs:
main_branch:
default: 'main'
type: string
run_merge_queue:
description: 'Should the merge que step run'
required: false
type: boolean
default: false
outputs:
MQ_SHA:
value: ${{ jobs.install.outputs.MQ_SHA}}
MQ_DOCKER_TAG:
value: ${{ jobs.install.outputs.MQ_DOCKER_TAG }}
MQ_ARTIFACT_NAME:
value: ${{ jobs.install.outputs.MQ_ARTIFACT_NAME }}
MQ_GIT_BRANCH:
value: ${{ jobs.install.outputs.MQ_GIT_BRANCH }}
MQ_SHOULD_RUN_BUILD:
value: ${{ jobs.install.outputs.MQ_SHOULD_RUN_BUILD}}
TEST_CHUNKS:
value: ${{ jobs.install.outputs.TEST_CHUNKS }}
E2E_CHUNKS:
Expand All @@ -20,6 +39,8 @@ on:
value: ${{ jobs.install.outputs.NX_BASE }}
DEPLOY_FEATURE:
value: ${{ jobs.install.outputs.DEPLOY_FEATURE }}
is-unicorn:
value: ${{ jobs.install.outputs.is-unicorn }}
env:
COMPOSE_HTTP_TIMEOUT: 180
SKIP_GENERATED_CACHE: ${{ contains(github.event.pull_request.labels.*.name, 'skip-generated-cache') }}
Expand Down Expand Up @@ -53,16 +74,25 @@ env:
jobs:
install:
outputs:
MQ_SHA: ${{ steps.prepare-merge-queue.outputs.GIT_SHA }}
MQ_DOCKER_TAG: ${{ steps.prepare-merge-queue.outputs.DOCKER_TAG }}
MQ_ARTIFACT_NAME: ${{ steps.prepare-merge-queue.outputs.ARTIFACT_NAME }}
MQ_GIT_BRANCH: ${{ steps.prepare-merge-queue.outputs.GIT_BRANCH }}
MQ_SHOULD_RUN_BUILD: ${{ steps.prepare-merge-queue.outputs.SHOULD_RUN_BUILD }}
LINT_CHUNKS: ${{ steps.lint_projects.outputs.CHUNKS }}
TEST_CHUNKS: ${{ steps.test_projects.outputs.CHUNKS }}
E2E_CHUNKS: ${{ steps.e2e_projects.outputs.CHUNKS }}
BUILD_CHUNKS: ${{ steps.build_projects.outputs.CHUNKS }}
DOCKER_CHUNKS: ${{ steps.docker_projects.outputs.CHUNKS }}
DOCKER_CHUNKS: ${{ steps.docker_projects.outputs.BUILD_CHUNKS }}
E2E_BUILD_ID: ${{ steps.e2e_projects.outputs.E2E_BUILD_ID }}
NX_HEAD: ${{ steps.export-sha.outputs.NX_HEAD }}
NX_BASE: ${{ steps.export-sha.outputs.NX_BASE }}
DEPLOY_FEATURE: ${{ steps.set-outputs.outputs.DEPLOY_FEATURE }}
is-unicorn: ${{ steps.unicorn.outputs.is-unicorn }}
runs-on: arc-runners
permissions:
contents: 'read'
actions: 'read'
steps:
- name: Set outputs
id: set-outputs
Expand All @@ -73,21 +103,44 @@ jobs:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

fetch-depth: 0
- name: Setup yarn
uses: ./.github/actions/setup-yarn

- name: load-deps
uses: ./.github/actions/load-deps

- id: get-branch
env:
RAW_REF: ${{ inputs.main_branch }}
run: |
echo "MAIN_BRANCH=${RAW_REF#refs/heads/}" >> $GITHUB_OUTPUT
echo "MAIN_BRANCH=${RAW_REF#refs/heads/}"
- name: Derive appropriate SHAs
if: ${{ inputs.run_merge_queue == false }}
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: ${{ steps.get-branch.outputs.MAIN_BRANCH }}

- name: Set base/head sha output
id: export-sha
shell: bash
run: |
if [[ "${{ inputs.run_merge_queue }}" == "true" ]]; then
# In merge que we always want to use the last
# commit as head - last commit sha is alway succesful
# since else it won't get merged!
# checkout this PR: https://github.com/nrwl/nx-set-shas/pull/145/files
# when this gets merged we can remove this hack!
#
# If we do not do this we will get the wrong base sha
# :(
export NX_HEAD=${{ github.sha }}
export NX_BASE=$(git rev-parse HEAD^1)
echo NX_HEAD="$NX_HEAD" >> "$GITHUB_OUTPUT"
echo NX_BASE="$NX_BASE" >> "$GITHUB_OUTPUT"
echo HEAD="$NX_HEAD" >> "$GITHUB_ENV"
echo BASE="$NX_BASE" >> "$GITHUB_ENV"
exit 0
fi
echo NX_HEAD="${{ env.NX_HEAD }}" >> "$GITHUB_OUTPUT"
echo NX_BASE="${{ env.NX_BASE }}" >> "$GITHUB_OUTPUT"
# NOTE: we reference BASE and HEAD elsewhere
Expand All @@ -102,6 +155,11 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "CI Bot"
- name: Prepare merge queue
id: prepare-merge-queue
if: ${{ inputs.run_merge_queue == true }}
run: |
node scripts/ci/docker/generate-tag.mjs
# This is to increase the retention days for our GitHub Actions run events
# See this for more information:
Expand All @@ -110,7 +168,7 @@ jobs:
uses: actions/upload-artifact@b18b1d32f3f31abcdc29dee3f2484801fe7822f4

# Don't run this step locally
if: ${{ !github.event.localrun }}
if: ${{ !github.event.localrun && inputs.run_merge_queue == false }}
with:
name: pr-event
path: event.json
Expand Down Expand Up @@ -167,7 +225,6 @@ jobs:
if [[ "$CHUNKS" != "[]" ]]; then
echo "CHUNKS={\"projects\":$CHUNKS}" >> "$GITHUB_OUTPUT"
fi
- name: Prepare docker build targets
id: docker_projects
if: ${{ steps.set-outputs.outputs.DEPLOY_FEATURE != 'true' }}
Expand All @@ -176,7 +233,8 @@ jobs:
CHUNKS="$(./scripts/ci/generate-docker-chunks.sh docker-express docker-next docker-static docker-playwright docker-jest)"
echo "CHUNKS: '$CHUNKS'"
if [[ "$CHUNKS" != "[]" ]]; then
echo CHUNKS="$CHUNKS" >> "$GITHUB_OUTPUT"
echo BUILD_CHUNKS=$(echo "$CHUNKS" | jq -cM '. | map("\(.|tostring)")') >> "$GITHUB_OUTPUT"
echo "CHUNKS='$CHUNKS'" >> "$GITHUB_OUTPUT"
fi
- name: License audit Node modules
Expand All @@ -198,3 +256,12 @@ jobs:
run: |
echo "## WARN permissions" >> "$GITHUB_STEP_SUMMARY"
echo "User '$GITHUB_ACTOR' does not have the required permissions to apply the 'test everything' label" >> "$GITHUB_STEP_SUMMARY"
- name: Set unicorn
id: unicorn
env:
NX_BASE: ${{ steps.export-sha.outputs.NX_BASE }}
NX_HEAD: ${{ steps.export-sha.outputs.NX_HEAD }}
run: |
is_unicorn=$(node scripts/ci/unicorn-utils.mjs is-unicorn "{\"head\": \"${NX_HEAD}\", \"base\": \"${NX_BASE}\" }")
echo is-unicorn="$is_unicorn" | tee -a "$GITHUB_OUTPUT"
Loading

0 comments on commit 03b6d5d

Please sign in to comment.