1- image : docker:20.10.16 -dind
1+ image : docker:24.0.7 -dind-alpine3.18 # Alpine 3.18's repo contains by default Python v3.11.8
22
33stages :
44 - deploy
@@ -15,18 +15,17 @@ variables:
1515 DOCKER_TLS_CERTDIR : " "
1616 DEBUG : 1
1717 LS_LOG : trace
18+ LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT : 300
1819
1920services :
20- - name : docker:20.10.16 -dind
21+ - name : docker:24.0.7 -dind-alpine3.18
2122 alias : docker
2223 command : ["--tls=false"]
2324
2425default :
2526 before_script : &default_before_scripts
2627 - apk update
27- - apk add --no-cache gcc musl-dev linux-headers bash zip jq curl
28- - apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.15/main python3~3.9
29- - apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.15/community py3-psutil~5.8
28+ - apk add --no-cache gcc musl-dev linux-headers bash zip jq curl py3-psutil python3
3029 - python3 -m ensurepip
3130 - python3 -m pip install --no-cache --upgrade pip setuptools
3231 - mkdir -p $PIP_CACHE_DIR
@@ -37,10 +36,6 @@ default:
3736 - localstack start -d
3837 - localstack wait -t 30
3938 - (test -f ./ls-state-pod.zip && localstack state import ./ls-state-pod.zip) || true
40- after_script :
41- - curl "$AWS_ENDPOINT_URL/_localstack/diagnose" | tee ls_diagnose.log
42- - docker ps | tee docker_ps.log
43- - docker inspect localstack-main | tee docker_inspect.log
4439 cache :
4540 paths :
4641 - $CI_PROJECT_DIR/.cache/pip
@@ -51,15 +46,31 @@ default:
5146
5247deploy :
5348 stage : deploy
49+ rules :
50+ - when : never
51+ changes :
52+ - ./*.md
53+ - LICENSE
54+ - .circleci/*
55+ - .github/*
56+ - when : always
5457 script :
5558 - ./bin/deploy.sh
5659 - localstack state export ./ls-state-pod.zip
60+ - localstack logs
5761
5862test :
5963 stage : test
64+ rules :
65+ - when : never
66+ changes :
67+ - ./*.md
68+ - LICENSE
69+ - .circleci/*
70+ - .github/*
71+ - when : always
6072 before_script :
6173 - *default_before_scripts
6274 - python3 -m pip install -r requirements-dev.txt
6375 script :
64- - python3 -m pytest tests
65-
76+ - python3 -m pytest tests || (localstack logs && exit 1)
0 commit comments