Skip to content

Commit 508d330

Browse files
authored
improve CICD (#18)
* improve CICD * fix wrong lambda name in CICD
1 parent 376f5dc commit 508d330

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,4 @@ cython_debug/
150150
# and can be added to the global gitignore or merged into this file. For a more nuclear
151151
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
152152
#.idea/
153+
scratch

CICD/deploy.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
set -e
33
set -o pipefail
4+
export AWS_DEFAULT_REGION=ap-southeast-2
5+
export LAMBDA_FUNCTION="${LAMBDA_FUNCTION:test-lammulti}"
46
test $LAMBDA_FUNCTION
57
cd lambda_code
68
pip install ../../ --target ./
@@ -10,7 +12,7 @@ echo deploying code
1012
aws lambda update-function-code --function-name $LAMBDA_FUNCTION --zip-file fileb://$(pwd)/../code.zip
1113
echo "waiting for lambda to finalize"
1214
aws lambda wait function-updated --function-name $LAMBDA_FUNCTION
13-
echo "invoking"
15+
echo "invoking $LAMBDA_FUNCTION"
1416
RESULT=$(aws lambda invoke --function-name $LAMBDA_FUNCTION --invocation-type RequestResponse RequestResponse --log-type Tail)
1517
echo $RESULT | jq .
1618
test null = $(echo $RESULT | jq .FunctionError)

CICD/lambda_code/RequestResponse

Lines changed: 0 additions & 1 deletion
This file was deleted.

CICD/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ Resources:
350350
PackageType: Zip
351351
ReservedConcurrentExecutions: 1
352352
Role: !GetAtt LambdaRole.Arn
353-
Runtime: python3.9
353+
Runtime: python3.11
354354
Timeout: 60
355355
VpcConfig:
356356
SecurityGroupIds:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
moto[s3]>=5
22
boto3
33
tox>=2.7.0
4+
wheel

0 commit comments

Comments
 (0)