From e949490b20489303ffef8bd3046b85c1996557be Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 23 Jun 2026 08:46:23 +0000 Subject: [PATCH] actually deploy lambda --- .github/workflows/_deploy_lambda.yml | 5 ++++ .github/workflows/deploy_terraform.yml | 38 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/.github/workflows/_deploy_lambda.yml b/.github/workflows/_deploy_lambda.yml index 0035a579..bce793dc 100644 --- a/.github/workflows/_deploy_lambda.yml +++ b/.github/workflows/_deploy_lambda.yml @@ -97,6 +97,9 @@ on: TF_VAR_openai_api_key: required: false + + TF_VAR_open_epc_api_token: + required: false jobs: deploy: runs-on: ubuntu-latest @@ -170,6 +173,7 @@ jobs: TF_VAR_magicplan_customer_id: ${{ secrets.TF_VAR_magicplan_customer_id }} TF_VAR_magicplan_api_key: ${{ secrets.TF_VAR_magicplan_api_key }} TF_VAR_openai_api_key: ${{ secrets.TF_VAR_openai_api_key }} + TF_VAR_open_epc_api_token: ${{ secrets.TF_VAR_open_epc_api_token }} run: | ECR_REPO_URL_VAR="" if [[ -n "${{ inputs.ecr_repo }}" ]]; then @@ -222,6 +226,7 @@ jobs: TF_VAR_magicplan_customer_id: ${{ secrets.TF_VAR_magicplan_customer_id }} TF_VAR_magicplan_api_key: ${{ secrets.TF_VAR_magicplan_api_key }} TF_VAR_openai_api_key: ${{ secrets.TF_VAR_openai_api_key }} + TF_VAR_open_epc_api_token: ${{ secrets.TF_VAR_open_epc_api_token }} run: | EXTRA_VARS="" if [[ -n "${{ inputs.ecr_repo }}" ]]; then diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 0780c580..5e469dc6 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -736,6 +736,44 @@ jobs: TF_VAR_db_name: ${{ secrets.DEV_DB_NAME }} TF_VAR_db_port: ${{ secrets.DEV_DB_PORT }} + # ============================================================ + # Build Modelling E2E image and Push + # ============================================================ + modelling_e2e_image: + needs: [determine_stage, shared_terraform] + uses: ./.github/workflows/_build_image.yml + with: + ecr_repo: modelling-e2e-${{ needs.determine_stage.outputs.stage }} + dockerfile_path: applications/modelling_e2e/Dockerfile + build_context: . + secrets: + AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.DEV_AWS_REGION }} + + # ============================================================ + # Deploy Modelling E2E Lambda + # ============================================================ + modelling_e2e_lambda: + needs: [modelling_e2e_image, determine_stage] + uses: ./.github/workflows/_deploy_lambda.yml + with: + lambda_name: modelling_e2e + lambda_path: deployment/terraform/lambda/modelling_e2e + stage: ${{ needs.determine_stage.outputs.stage }} + ecr_repo: modelling-e2e-${{ needs.determine_stage.outputs.stage }} + image_digest: ${{ needs.modelling_e2e_image.outputs.image_digest }} + terraform_apply: ${{ needs.determine_stage.outputs.terraform_apply }} + secrets: + AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.DEV_AWS_REGION }} + TF_VAR_db_host: ${{ secrets.DEV_DB_HOST }} + TF_VAR_db_name: ${{ secrets.DEV_DB_NAME }} + TF_VAR_db_port: ${{ secrets.DEV_DB_PORT }} + TF_VAR_open_epc_api_token: ${{ secrets.DEV_OPEN_EPC_API_TOKEN }} + TF_VAR_google_solar_api_key: ${{ secrets.DEV_GOOGLE_SOLAR_API_KEY }} + # ============================================================ # Deploy Hubspot ETL Lambda # ============================================================