Skip to content

Commit 67a3cde

Browse files
irumvanselmeApostolosBenisis
authored andcommitted
wip(iac): deploy new dev environment [pulumi up]
wip: separate build and develop jobs so that we can be able to re-use deploy on multiple environments. WIP: realm, environment, backend REALM, ENVIRONMENT: Both are working but the following is still open for these two besides various TODO in the code the iac/README.MD needs to be updated, the infra diagram from lucid added and also the mermaid diagram BACKEND: preview works, but could not test if the rest works wip: deploy test-realm realm. add: documentation remove: default gcp_api_gateway_config.yaml wip: add deploy script WIP: manage the Identity Platform’s lifecycle with a dynamic resource .env should use the fully qualified stack name resource name should not have the realm or env name wip: setup_env.py wip: upload-artifacts.sh, deploy and destroy scripts. wip: wait for update identity toolkit config to apply separate upload-backend-artifacts.sh and upload-backend-artifacts.sh wip: api gateway config mini refactor wip: upload-backend-artifacts.sh, upload-frontend-artifacts.sh intermediate commit wip: Github test/build pipeline is working (without deploy) wip: github deploy to dev [pulumi up]. try: using backend: .env.example clean up: build and upload scripts clean up: remove Pulumi.<environment>.yaml and unused github workflows. fix(backend): to separate target_environment_name and target_environment_type: Target environment type: is used to know when to allow local development when setting CORS Policy. Target environment name: required to know the environment some sentry events occurred. wip: Github pipeline and configuration versioning wip: upload templates wip: setup_env script fix: build and upload github pipeline wip: set-up-env, prepare and up scripts wip: refactor branch name formatters fix: add a hash on the artifacts name to ensure uniqueness fix: generate_esco_embeddings.py to have a possibility to generate indexes only. wip: Generate indexes wip: Show the actual secret run setup.py for each env pinning the release - deploy dev and expect to cik the correct secrets files feat(auth): use custom domains chore(docs): Add necessary docs to deploy wip: ssl_status chore(docs): deployment-procedure.md wip: identity platform setup with email template and custom domain support, add dns stack wip(deploy-compass-realm): fix auth deploymnent.
1 parent 8678e4c commit 67a3cde

File tree

104 files changed

+7019
-2182
lines changed

Some content is hidden

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

104 files changed

+7019
-2182
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)