@@ -18,6 +18,14 @@ default:
1818 # Retry when the runner fails to start
1919 - runner_system_failure
2020
21+ # The Noble Python image uses managed system Python and does not include AWS CLI.
22+ .install -python-tools: &install-python-tools
23+ - apt-get update
24+ - apt-get install -y --no-install-recommends python3-venv python-is-python3
25+ - python3 -m venv /opt/ci-python-tools
26+ - /opt/ci-python-tools/bin/pip install awscli
27+ - export PATH= " /opt/ci-python-tools/bin:$PATH"
28+
2129# This is for serverless framework
2230.install -node: &install-node
2331 - apt-get update
@@ -42,7 +50,7 @@ default:
4250build-layer ({{ $runtime .name }}-{{ $runtime .arch }}):
4351 stage: build
4452 tags: [" arch:amd64" ]
45- image: registry.ddbuild.io /images/docker:20 .10
53+ image: registry.ddbuild.io /images/docker:27 .3.1
4654 artifacts:
4755 expire_in: 1 day # Unsigned zips expire in 1 day
4856 paths:
@@ -57,7 +65,7 @@ build-layer ({{ $runtime.name }}-{{ $runtime.arch }}):
5765check-layer-size ({{ $runtime .name }}-{{ $runtime .arch }}):
5866 stage: test
5967 tags: [" arch:amd64" ]
60- image: registry.ddbuild.io /images/docker:20 .10
68+ image: registry.ddbuild.io /images/docker:27 .3.1
6169 needs:
6270 - build-layer ({{ $runtime .name }}-{{ $runtime .arch }})
6371 dependencies:
@@ -103,7 +111,7 @@ unit-test ({{ $runtime.name }}-{{ $runtime.arch }}):
103111integration-test ({{ $runtime .name }}-{{ $runtime .arch }}):
104112 stage: test
105113 tags: [" arch:amd64" ]
106- image: registry.ddbuild.io /images/docker:20 .10 -py3
114+ image: registry.ddbuild.io /images/docker:29 .4.0 -noble -py3
107115 rules:
108116 - if : '$SKIP_E2E_TESTS == " true" '
109117 when: never
@@ -116,19 +124,20 @@ integration-test ({{ $runtime.name }}-{{ $runtime.arch }}):
116124 variables:
117125 CI_ENABLE_CONTAINER_IMAGE_BUILDS: " true"
118126 before_script:
127+ - *install-python-tools
119128 - *install-node
120129 - EXTERNAL_ID_NAME= integration-test-externalid ROLE_TO_ASSUME= sandbox-integration-test-deployer AWS_ACCOUNT= 425362996713 source . /ci/get_secrets.sh
121130 - yarn global add serverless@^3.38.0 --prefix /usr/local
122131 - yarn global add serverless-python-requirements@^6.1.1 --prefix /usr/local
123- - cd integration_tests && yarn install && cd ..
132+ - yarn --cwd tests/integration install
124133 script:
125134 - RUNTIME_PARAM= {{ $runtime .python_version }} ARCH= {{ $runtime .arch }} . /scripts/run_integration_tests.sh
126135 retry: 2
127136
128137sign-layer ({{ $runtime .name }}-{{ $runtime .arch }}):
129138 stage: sign
130139 tags: [" arch:amd64" ]
131- image: registry.ddbuild.io /images/docker:20 .10 -py3
140+ image: registry.ddbuild.io /images/docker:29 .4.0 -noble -py3
132141 rules:
133142 - if : '$CI_COMMIT_TAG = ~ /^v. */'
134143 when: manual
@@ -145,6 +154,7 @@ sign-layer ({{ $runtime.name }}-{{ $runtime.arch }}):
145154 paths:
146155 - .layers /datadog_lambda_py-{{ $runtime .arch }}-{{ $runtime .python_version }}.zip
147156 before_script:
157+ - *install-python-tools
148158 - apt-get update
149159 - apt-get install -y uuid-runtime
150160 {{ with $environment := (ds " environments" ).environments.prod }}
@@ -159,7 +169,7 @@ sign-layer ({{ $runtime.name }}-{{ $runtime.arch }}):
159169publish-layer-{{ $environment_name }} ({{ $runtime .name }}-{{ $runtime .arch }}):
160170 stage: publish
161171 tags: [" arch:amd64" ]
162- image: registry.ddbuild.io /images/docker:20 .10 -py3
172+ image: registry.ddbuild.io /images/docker:29 .4.0 -noble -py3
163173 rules:
164174 - if : '$SKIP_E2E_TESTS == " true" '
165175 when: never
@@ -194,6 +204,8 @@ publish-layer-{{ $environment_name }} ({{ $runtime.name }}-{{ $runtime.arch }}):
194204 - {{ .code }}
195205 {{- end }}
196206 before_script:
207+ - *install-python-tools
208+ - export SKIP_PIP_INSTALL= true
197209 - EXTERNAL_ID_NAME= {{ $environment .external_id }} ROLE_TO_ASSUME= {{ $environment .role_to_assume }} AWS_ACCOUNT= {{ $environment .account }} source . /ci/get_secrets.sh
198210 script:
199211 - STAGE= {{ $environment_name }} PYTHON_VERSION= {{ $runtime .python_version }} ARCH= {{ $runtime .arch }} DOTENV= {{ $dotenv }} . /ci/publish_layers.sh
@@ -205,8 +217,9 @@ publish-layer-{{ $environment_name }} ({{ $runtime.name }}-{{ $runtime.arch }}):
205217publish-pypi-package:
206218 stage: publish
207219 tags: [" arch:amd64" ]
208- image: registry.ddbuild.io /images/docker:20 .10 -py3
220+ image: registry.ddbuild.io /images/docker:29 .4.0 -noble -py3
209221 before_script:
222+ - *install-python-tools
210223 - . /scripts/setup_python_env.sh
211224 cache: []
212225 rules:
@@ -221,7 +234,7 @@ publish-pypi-package:
221234layer bundle:
222235 stage: build
223236 tags: [" arch:amd64" ]
224- image: registry.ddbuild.io /images/docker:20 .10
237+ image: registry.ddbuild.io /images/docker:27 .3.1
225238 needs:
226239 {{ range $runtimes }}
227240 - build-layer ({{ .name }}-{{ .arch }})
@@ -242,7 +255,7 @@ layer bundle:
242255
243256signed layer bundle:
244257 stage: sign
245- image: registry.ddbuild.io /images/docker:20 .10 -py3
258+ image: registry.ddbuild.io /images/docker:29 .4.0 -noble -py3
246259 tags: [" arch:amd64" ]
247260 rules:
248261 - if : '$CI_COMMIT_TAG = ~ /^v. */'
@@ -290,7 +303,7 @@ e2e-test:
290303
291304e2e-test-status:
292305 stage: e2e
293- image: registry.ddbuild.io /images/docker:20 .10 -py3
306+ image: registry.ddbuild.io /images/docker:29 .4.0 -noble -py3
294307 tags: [" arch:amd64" ]
295308 timeout: 3h
296309 rules:
0 commit comments