mirror of
https://github.com/Sea-Haven-Industries/front-integrations.git
synced 2026-09-30 07:13:12 +00:00
Freeze SAM CD and add Terraform for seahaven-prod (Lambdas, DynamoDB, EventBridge, alarms) so HCP becomes the sole deploy path. Include prod secret ARNs in the tfvars example for workspace wiring.
29 lines
916 B
Bash
Executable file
29 lines
916 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Package Lambda zips for HCP plan/apply. Runs on the Terraform worker.
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
|
BUILD="${ROOT}/build"
|
|
SRC="$(cd "${ROOT}/../src" && pwd)"
|
|
|
|
rm -rf "${BUILD}"
|
|
mkdir -p "${BUILD}/sla_monitor" "${BUILD}/user_sync"
|
|
|
|
cp "${SRC}/sla_monitor/app.py" "${BUILD}/sla_monitor/app.py"
|
|
|
|
cp "${SRC}/user_sync/app.py" "${BUILD}/user_sync/app.py"
|
|
python3 -m pip install \
|
|
--quiet \
|
|
--disable-pip-version-check \
|
|
-r "${SRC}/user_sync/requirements.txt" \
|
|
-t "${BUILD}/user_sync/" \
|
|
--platform manylinux2014_aarch64 \
|
|
--implementation cp \
|
|
--python-version 3.12 \
|
|
--only-binary=:all: \
|
|
--upgrade
|
|
|
|
# Runtime provides boto3; drop the copy to keep the zip smaller.
|
|
rm -rf "${BUILD}/user_sync/boto3" "${BUILD}/user_sync/botocore" \
|
|
"${BUILD}/user_sync/s3transfer" "${BUILD}/user_sync/jmespath" \
|
|
"${BUILD}/user_sync/"*.dist-info 2>/dev/null || true
|