@@ -39,24 +39,13 @@ build-layer ({{ $runtime.name }}-{{ $runtime.arch }}):
3939 stage: build
4040 tags: [" arch:amd64" ]
4141 image: registry.ddbuild.io /images/docker:20.10
42- {{- if eq $runtime .python_version " 3.8" }}
43- rules:
44- # Skip Python 3.8 layer builds when triggered from an upstream dd-trace pipeline (dd-trace no longer supports 3.8 )
45- - if : '$DD_TRACE_COMMIT || $DD_TRACE_COMMIT_BRANCH || $DD_TRACE_WHEEL || $UPSTREAM_PIPELINE_ID '
46- when: never
47- - when: on_success
48- {{- end }}
4942 artifacts:
5043 expire_in: 1 hr # Unsigned zips expire in 1 hour
5144 paths:
5245 - .layers /datadog_lambda_py-{{ $runtime .arch }}-{{ $runtime .python_version }}.zip
5346 variables:
5447 CI_ENABLE_CONTAINER_IMAGE_BUILDS: " true"
5548 script:
56- - echo $DD_TRACE_COMMIT
57- - echo $DD_TRACE_COMMIT_BRANCH
58- - echo $DD_TRACE_WHEEL
59- - echo $UPSTREAM_PIPELINE_ID
6049 - PYTHON_VERSION= {{ $runtime .python_version }} ARCH= {{ $runtime .arch }} . /scripts/build_layers.sh
6150 timeout: 15m
6251 retry: 2
@@ -65,12 +54,6 @@ check-layer-size ({{ $runtime.name }}-{{ $runtime.arch }}):
6554 stage: test
6655 tags: [" arch:amd64" ]
6756 image: registry.ddbuild.io /images/docker:20.10
68- {{- if eq $runtime .python_version " 3.8" }}
69- rules:
70- - if : '$DD_TRACE_COMMIT || $DD_TRACE_COMMIT_BRANCH || $DD_TRACE_WHEEL || $UPSTREAM_PIPELINE_ID '
71- when: never
72- - when: on_success
73- {{- end }}
7457 needs:
7558 - build-layer ({{ $runtime .name }}-{{ $runtime .arch }})
7659 dependencies:
@@ -223,11 +206,14 @@ layer bundle:
223206 stage: build
224207 tags: [" arch:amd64" ]
225208 image: registry.ddbuild.io /images/docker:20.10
226- rules:
227- - if : '$SKIP_E2E_TESTS == " true" '
228- when: never
229- - when: on_success
230- dependencies: []
209+ needs:
210+ {{ range (ds " runtimes" ).runtimes }}
211+ - build-layer ({{ .name }}-{{ .arch }})
212+ {{ end }}
213+ dependencies:
214+ {{ range (ds " runtimes" ).runtimes }}
215+ - build-layer ({{ .name }}-{{ .arch }})
216+ {{ end }}
231217 artifacts:
232218 expire_in: 1 hr
233219 paths:
@@ -244,7 +230,14 @@ signed layer bundle:
244230 tags: [" arch:amd64" ]
245231 rules:
246232 - if : '$CI_COMMIT_TAG = ~ /^v. */'
247- dependencies: []
233+ needs:
234+ {{ range (ds " runtimes" ).runtimes }}
235+ - sign-layer ({{ .name }}-{{ .arch }})
236+ {{ end }}
237+ dependencies:
238+ {{ range (ds " runtimes" ).runtimes }}
239+ - sign-layer ({{ .name }}-{{ .arch }})
240+ {{ end }}
248241 artifacts:
249242 expire_in: 1 day
250243 paths:
@@ -273,13 +266,9 @@ e2e-test:
273266 PYTHON_{{ $version }}_VERSION: $PYTHON_ {{ $version }}_VERSION
274267 {{- end }}
275268 {{- end }}
276- needs:
277- {{- range (ds " runtimes" ).runtimes }}
269+ needs: {{ range (ds " runtimes" ).runtimes }}
278270 {{- if eq .arch " amd64" }}
279- - job: " publish-layer-sandbox ({{ .name }}-{{ .arch }}): [{{ $e2e_region }}]"
280- {{- if eq .python_version " 3.8" }}
281- optional: true
282- {{- end }}
271+ - " publish-layer-sandbox ({{ .name }}-{{ .arch }}): [{{ $e2e_region }}]"
283272 {{- end }}
284273 {{- end }}
285274
0 commit comments