File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,6 @@ def build_connector_image(
228228 }
229229
230230 base_tag = f"{ metadata .data .dockerRepository } :{ tag } "
231- arch_images : list [str ] = []
232231
233232 if metadata .data .language == ConnectorLanguage .JAVA :
234233 # This assumes that the repo root ('airbyte') is three levels above the
@@ -245,12 +244,18 @@ def build_connector_image(
245244 check = True ,
246245 )
247246
248- for arch in [ArchEnum .AMD64 , ArchEnum .ARM64 ]:
247+ # Always build for AMD64, and optionally for ARM64 if needed locally.
248+ architectures = [ArchEnum .AMD64 ]
249+ if primary_arch == ArchEnum .ARM64 :
250+ architectures += [ArchEnum .ARM64 ]
251+
252+ built_images : list [str ] = []
253+ for arch in architectures :
249254 docker_tag = f"{ base_tag } -{ arch .value } "
250255 docker_tag_parts = docker_tag .split ("/" )
251256 if len (docker_tag_parts ) > 2 :
252257 docker_tag = "/" .join (docker_tag_parts [- 1 :])
253- arch_images .append (
258+ built_images .append (
254259 _build_image (
255260 context_dir = connector_directory ,
256261 dockerfile = dockerfile_path ,
You can’t perform that action at this time.
0 commit comments