11{{- $e2e_region := " us-west-2" -}}
2+ {{- $runtimes := coll.Slice -}}
3+ {{- range $py := (ds " python_versions" ).versions }}{{ range $arch := coll.Slice " amd64" " arm64" }}
4+ {{- $runtimes = $runtimes | coll.Append (dict " name" (printf " python%s " ($py .version | strings.ReplaceAll " ." " " )) " python_version" $py .version " arch" $arch " image" $py .image ) }}
5+ {{- end }}{{ end -}}
26
37stages:
48 - build
@@ -26,7 +30,7 @@ default:
2630 - apt-get install nodejs -y
2731 - npm install --global yarn
2832
29- {{ range $runtime := (ds " runtimes " ) . runtimes }}
33+ {{ range $runtime := $ runtimes }}
3034
3135# TODO(astuyve) - figure out python build cache
3236. {{ $runtime .name }}-{{ $runtime .arch }}-cache: &{{ $runtime .name }}-{{ $runtime .arch }}-cache
@@ -208,7 +212,7 @@ publish-pypi-package:
208212 rules:
209213 - if : '$CI_COMMIT_TAG = ~ /^v. */'
210214 when: manual
211- needs: {{ range $runtime := (ds " runtimes " ) . runtimes }}
215+ needs: {{ range $runtime := $ runtimes }}
212216 - sign-layer ({{ $runtime .name }}-{{ $runtime .arch }})
213217 {{- end }}
214218 script:
@@ -219,11 +223,11 @@ layer bundle:
219223 tags: [" arch:amd64" ]
220224 image: registry.ddbuild.io /images/docker:20.10
221225 needs:
222- {{ range (ds " runtimes " ) . runtimes }}
226+ {{ range $ runtimes }}
223227 - build-layer ({{ .name }}-{{ .arch }})
224228 {{ end }}
225229 dependencies:
226- {{ range (ds " runtimes " ) . runtimes }}
230+ {{ range $ runtimes }}
227231 - build-layer ({{ .name }}-{{ .arch }})
228232 {{ end }}
229233 artifacts:
@@ -243,11 +247,11 @@ signed layer bundle:
243247 rules:
244248 - if : '$CI_COMMIT_TAG = ~ /^v. */'
245249 needs:
246- {{ range (ds " runtimes " ) . runtimes }}
250+ {{ range $ runtimes }}
247251 - sign-layer ({{ .name }}-{{ .arch }})
248252 {{ end }}
249253 dependencies:
250- {{ range (ds " runtimes " ) . runtimes }}
254+ {{ range $ runtimes }}
251255 - sign-layer ({{ .name }}-{{ .arch }})
252256 {{ end }}
253257 artifacts:
@@ -272,13 +276,13 @@ e2e-test:
272276 variables:
273277 LANGUAGES_SUBSET: python
274278 # These env vars are inherited from the dotenv reports of the publish-layer jobs
275- {{- range (ds " runtimes " ) . runtimes }}
279+ {{- range $ runtimes }}
276280 {{- if eq .arch " amd64" }}
277281 {{- $version := print (.name | strings.Trim " python" ) }}
278282 PYTHON_{{ $version }}_VERSION: $PYTHON_ {{ $version }}_VERSION
279283 {{- end }}
280284 {{- end }}
281- needs: {{ range (ds " runtimes " ) . runtimes }}
285+ needs: {{ range $ runtimes }}
282286 {{- if eq .arch " amd64" }}
283287 - " publish-layer-sandbox ({{ .name }}-{{ .arch }}): [{{ $e2e_region }}]"
284288 {{- end }}
0 commit comments