Skip to content

Commit 778b437

Browse files
irumvanselmeApostolosBenisis
authored andcommitted
feat(iac): new deployment pipeline
- introduction of realms and environments - using artifact repositories for built artifacts - separation of build and deployment - automate the gcp identity platform setup - automate the firebase custom domain configuration & email verification templates - using gcp secret manager to store deployment secrets and pulumi configs - support of automated and manual deployment of environments - support deployment of previous releases (besides the latest main) - configure cloudrun and api-gateway runtime params - generate_esco_embeddings.py can generate indexes only. - possibility to import invitation codes
1 parent 8678e4c commit 778b437

File tree

108 files changed

+6945
-2189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+6945
-2189
lines changed

.github/workflows/backend-ci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Backend CI & Artifact Upload
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
upload-artifacts:
7+
required: true
8+
type: boolean
9+
description: 'Whether to upload deployable artifacts'
10+
11+
jobs:
12+
test-build-and-upload:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# setup.
16+
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.11'
24+
25+
- name: Load cached Poetry installation
26+
id: cached-poetry
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/.local
30+
key: poetry-0
31+
32+
- name: Install Poetry
33+
uses: snok/install-poetry@v1
34+
with:
35+
version: 1.8.5
36+
37+
- name: Load cached Poetry cache
38+
uses: actions/cache@v4
39+
with:
40+
path: ~/.cache/pypoetry
41+
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }}
42+
43+
- name: Install dependencies
44+
shell: bash
45+
run: |
46+
poetry lock --no-update --no-interaction
47+
poetry install --no-interaction
48+
working-directory: backend
49+
50+
# test and lint
51+
52+
- name: Linting Bandit
53+
shell: bash
54+
run: poetry run bandit -c bandit.yaml -r .
55+
working-directory: backend
56+
57+
- name: Linting Pylint
58+
shell: bash
59+
# Do not fail the build if linting errors (--exit-zero)
60+
# Once we have fixed all the linting errors, we can remove this flag.
61+
run: poetry run pylint --exit-zero --recursive=y .
62+
working-directory: backend
63+
64+
- name: Copy the template .env.example to .env
65+
run: cp backend/.env.example backend/.env
66+
67+
- name: Run unit tests
68+
shell: bash
69+
run: poetry run pytest -m 'not (evaluation_test or smoke_test)'
70+
working-directory: backend
71+
72+
# build and upload artifacts
73+
74+
- name: Authenticate to google cloud
75+
if: ${{ inputs.upload-artifacts }}
76+
uses: google-github-actions/[email protected]
77+
with:
78+
credentials_json:
79+
${{ secrets.GCP_LOWER_ENVS_SERVICE_ACCOUNT_JSON }}
80+
81+
- name: Run build and upload script.
82+
shell: bash
83+
if: ${{ inputs.upload-artifacts }}
84+
run: |
85+
./iac/scripts/build-and-upload-be.sh ${{ vars.ARTIFACT_REGISTRY_REGION }} ${{ secrets.GCP_REALM_ROOT_PROJECT_ID }} $GITHUB_STEP_SUMMARY $GITHUB_RUN_NUMBER

.github/workflows/build-frontend.yml

Lines changed: 0 additions & 119 deletions
This file was deleted.

.github/workflows/config-ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Upload configurations and templates
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
upload-templates:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
13+
- name: Authenticate to google cloud
14+
id: auth
15+
uses: google-github-actions/[email protected]
16+
with:
17+
credentials_json:
18+
${{ secrets.GCP_LOWER_ENVS_SERVICE_ACCOUNT_JSON }}
19+
20+
- name: upload templates
21+
working-directory: iac
22+
run: |
23+
./scripts/upload-templates.sh ${{ vars.ARTIFACT_REGISTRY_REGION }} ${{ secrets.GCP_REALM_ROOT_PROJECT_ID }}

.github/workflows/deploy-auth.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/deploy-aws-ns.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)