From 764ee81dad1447be2008ecdad77283412cd0026c Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 30 Mar 2026 15:52:28 +0000 Subject: [PATCH] hubspot etl --- .github/workflows/deploy_terraform.yml | 42 ++++++++++++++++++++++++- infrastructure/terraform/shared/main.tf | 2 +- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index e41534e6..500b2435 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -433,4 +433,44 @@ jobs: - name: Terraform Apply if: env.TERRAFORM_APPLY == 'true' working-directory: infrastructure/terraform/cdn - run: terraform apply -auto-approve tfplan \ No newline at end of file + run: terraform apply -auto-approve tfplan + + # ============================================================ + # Build Hubspot ETL image + # ============================================================ + hubspot_etl_image: + needs: [determine_stage, shared_terraform] + uses: ./.github/workflows/_build_image.yml + with: + ecr_repo: hubspot-etl-${{ needs.determine_stage.outputs.stage }} + dockerfile_path: etl/hubspot/scripts/scraper/handler/Dockerfile + build_context: . + build_args: | + DEV_DB_HOST=$DEV_DB_HOST + DEV_DB_PORT=$DEV_DB_PORT + DEV_DB_NAME=$DEV_DB_NAME + 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 }} + DEV_DB_HOST: ${{ secrets.DEV_DB_HOST }} + DEV_DB_PORT: ${{ secrets.DEV_DB_PORT }} + DEV_DB_NAME: ${{ secrets.DEV_DB_NAME }} + + # ============================================================ + # Deploy OrdanceSurvey Lambda + # ============================================================ + ordnanceSurvey_lambda: + needs: [hubspot_etl_image, determine_stage] + uses: ./.github/workflows/_deploy_lambda.yml + with: + lambda_name: hubspotETLtoAraDb + lambda_path: infrastructure/terraform/lambda/hubspot_deal_etl + stage: ${{ needs.determine_stage.outputs.stage }} + ecr_repo: ordnance-${{ needs.determine_stage.outputs.stage }} + image_digest: ${{ needs.hubspot_etl_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 }} diff --git a/infrastructure/terraform/shared/main.tf b/infrastructure/terraform/shared/main.tf index 5a396b3a..25c40b7a 100644 --- a/infrastructure/terraform/shared/main.tf +++ b/infrastructure/terraform/shared/main.tf @@ -586,7 +586,7 @@ module "hubspot_etl_bucket" { module "hubspot_etl_registry" { source = "../modules/container_registry" - name = "hubspot_etl" + name = "hubspot-etl" stage = var.stage }