File tree Expand file tree Collapse file tree 4 files changed +11
-19
lines changed
Expand file tree Collapse file tree 4 files changed +11
-19
lines changed Original file line number Diff line number Diff line change 11SHELL =/usr/bin/env bash -euo pipefail
22
3- PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS = ack_backend backend delta_backend filenameprocessor mesh_processor recordprocessor redis_sync lambdas/id_sync
3+ PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS = ack_backend backend delta_backend filenameprocessor mesh_processor recordprocessor redis_sync lambdas/id_sync lambdas/shared
44PYTHON_PROJECT_DIRS = e2e e2e_batch $(PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS )
55
66# Installs dependencies using poetry.
@@ -41,7 +41,7 @@ build-proxy:
4141 scripts/build_proxy.sh
4242
4343# Files to loop over in release
44- _dist_include ="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/. specification sandbox terraform scripts $(PYTHON_PROJECT_DIRS ) "
44+ _dist_include ="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/. specification sandbox terraform scripts $(PYTHON_PROJECT_DIRS ) $( PYTHON_LAMBDA_DEPENDENCIES ) "
4545
4646
4747# Create /dist/ sub-directory and copy files into directory
Original file line number Diff line number Diff line change @@ -56,13 +56,8 @@ steps:
5656 echo Apigee environment: $APIGEE_ENVIRONMENT
5757 echo pr_no: $pr_no
5858
59+ echo "Output dirs"
5960 ls
60- cd lambdas
61- ls
62- cd id_sync
63- ls
64- cd ..
65- cd ..
6661 cd terraform
6762
6863 make init
Original file line number Diff line number Diff line change @@ -8,9 +8,8 @@ RUN mkdir -p /home/appuser && \
88
99# Install Poetry dependencies
1010# Copy id_sync Poetry files
11- COPY id_sync/poetry.lock id_sync/pyproject.toml id_sync/README.md ./
12- # Copy shared/src/common to ./src/common
13- COPY shared/src/common ./src/common
11+ COPY ./id_sync/poetry.lock ./id_sync/pyproject.toml ./
12+ COPY ./shared/src/common ./src/common
1413
1514RUN echo "Listing /var/task after source code copy:" && ls -R /var/task
1615
@@ -25,10 +24,10 @@ FROM base AS build
2524WORKDIR /var/task
2625
2726# Copy shared source code
28- COPY .. /shared/src/common ./common
27+ COPY ./shared/src/common ./common
2928
3029# Copy id_sync source code
31- COPY src .
30+ COPY ./id_sync/ src .
3231
3332# Set correct permissions
3433RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)
Original file line number Diff line number Diff line change 11# Define the directory containing the Docker image and calculate its SHA-256 hash for triggering redeployments
22locals {
3- lambdas_dir = abspath (" ${ path . root } /../lambdas" )
4- shared_dir = " ${ local . lambdas_dir } /shared"
5- id_sync_lambda_dir = abspath (" ${ path . root } /../lambdas/id_sync" )
6- id_sync_dockerfile = " ${ local . lambdas_dir } /id_sync.Dockerfile"
3+ shared_dir = abspath (" ${ path . root } /../shared" )
4+ id_sync_lambda_dir = abspath (" ${ path . root } /../id_sync" )
75
86 # Get files from both directories
97 shared_files = fileset (local. shared_dir , " **" )
@@ -27,7 +25,7 @@ resource "aws_ecr_repository" "id_sync_lambda_repository" {
2725module "id_sync_docker_image" {
2826 source = " terraform-aws-modules/lambda/aws//modules/docker-build"
2927 version = " 8.0.1"
30- docker_file_path = " Dockerfile"
28+ docker_file_path = " ./id_sync/ Dockerfile"
3129 create_ecr_repo = false
3230 ecr_repo = aws_ecr_repository. id_sync_lambda_repository . name
3331 ecr_repo_lifecycle_policy = jsonencode ({
@@ -49,7 +47,7 @@ module "id_sync_docker_image" {
4947
5048 platform = " linux/amd64"
5149 use_image_tag = false
52- source_path = local . id_sync_lambda_dir
50+ source_path = abspath ( " ${ path . root } /.. " )
5351 triggers = {
5452 dir_sha = local.id_sync_lambda_dir_sha
5553 }
You can’t perform that action at this time.
0 commit comments