mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Move lambda package building to public.ecr.aws/lambda/python for compatibility
This commit is contained in:
parent
0ddd53088d
commit
b7c5fdab77
@ -6,13 +6,14 @@ build-backend = "setuptools.build_meta"
|
||||
name = "lambda_shared"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"requests < 2.30",
|
||||
"requests",
|
||||
"urllib3 < 2"
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
token = [
|
||||
"PyJWT",
|
||||
"cryptography<38",
|
||||
"cryptography",
|
||||
]
|
||||
dev = [
|
||||
"boto3",
|
||||
|
@ -12,7 +12,7 @@ DRY_RUN=${DRY_RUN:-}
|
||||
PY_VERSION=${PY_VERSION:-3.10}
|
||||
PY_EXEC="python${PY_VERSION}"
|
||||
# Image to build the lambda zip package
|
||||
DOCKER_IMAGE="python:${PY_VERSION}-slim"
|
||||
DOCKER_IMAGE="public.ecr.aws/lambda/python:${PY_VERSION}"
|
||||
# Rename the_lambda_name directory to the-lambda-name lambda in AWS
|
||||
LAMBDA_NAME=${DIR_NAME//_/-}
|
||||
# The name of directory with lambda code
|
||||
@ -23,9 +23,9 @@ cp app.py "$PACKAGE"
|
||||
if [ -f requirements.txt ]; then
|
||||
VENV=lambda-venv
|
||||
rm -rf "$VENV" lambda-package.zip
|
||||
docker run --rm --user="${UID}" -e HOME=/tmp \
|
||||
docker run --rm --user="${UID}" -e HOME=/tmp --entrypoint=/bin/bash \
|
||||
--volume="${WORKDIR}/..:/ci" --workdir="/ci/${DIR_NAME}" "${DOCKER_IMAGE}" \
|
||||
/bin/bash -exc "
|
||||
-exc "
|
||||
'$PY_EXEC' -m venv '$VENV' &&
|
||||
source '$VENV/bin/activate' &&
|
||||
pip install -r requirements.txt
|
||||
|
Loading…
Reference in New Issue
Block a user