Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix only docker can be used in some helper scripts #24052

Merged
merged 2 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/@aws-cdk/aws-s3-deployment/test/lambda/debug.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/sh
# starts a debugging container for the python lambda function and tests

DOCKER_CMD=${CDK_DOCKER:-docker}

tag="s3-deployment-test-environment"
docker build -f Dockerfile.debug -t $tag .
$DOCKER_CMD build -f Dockerfile.debug -t $tag .

echo "To iterate, run python3 ./test.py inside the container (source code is mapped into the container)."

ln -fs /opt/lambda/index.py index.py
docker run -v $PWD:/opt/awscli -v $PWD/../../lib/lambda:/opt/lambda --workdir /opt/awscli -it $tag
$DOCKER_CMD run -v $PWD:/opt/awscli -v $PWD/../../lib/lambda:/opt/lambda --workdir /opt/awscli -it $tag
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-s3-deployment/test/lambda/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ cp -f ${scriptdir}/../../lib/lambda/* $PWD
cp -f ${scriptdir}/* $PWD

# this will run our tests inside the right environment
docker build .
DOCKER_CMD=${CDK_DOCKER:-docker}
$DOCKER_CMD build .