Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,14 @@ def build_ci_image(verbose: bool, dry_run: bool, ci_image_params: BuildCiParams)
:param dry_run: do not execute "write" commands - just print what would happen
:param ci_image_params: CI image parameters
"""
if not ci_image_params.push_image and ci_image_params.is_multi_platform():
if (
ci_image_params.is_multi_platform()
and not ci_image_params.push_image
and not ci_image_params.prepare_buildx_cache
):
get_console().print(
"\n[red]You cannot use multi-platform build without using --push-image flag![/]\n"
"\n[red]You cannot use multi-platform build without using --push-image flag or "
"preparing buildx cache![/]\n"
)
return 1, "Error: building multi-platform image without --push-image."
fix_group_permissions(verbose=verbose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,14 @@ def build_production_image(
:param dry_run: do not execute "write" commands - just print what would happen
:param prod_image_params: PROD image parameters
"""
if not prod_image_params.push_image and prod_image_params.is_multi_platform():
if (
prod_image_params.is_multi_platform()
and not prod_image_params.push_image
and not prod_image_params.prepare_buildx_cache
):
get_console().print(
"\n[red]You cannot use multi-platform build without using --push-image flag![/]\n"
"\n[red]You cannot use multi-platform build without using --push-image flag"
" or preparing buildx cache![/]\n"
)
return 1, "Error: building multi-platform image without --push-image."
fix_group_permissions(verbose=verbose)
Expand Down