potiuk commented on a change in pull request #20338: URL: https://github.com/apache/airflow/pull/20338#discussion_r778608790
########## File path: dev/breeze/src/airflow_breeze/breeze.py ########## @@ -95,12 +93,103 @@ def shell(verbose: bool): @option_verbose -@main.command() -def build_ci_image(verbose: bool): - """Builds breeze.ci image for breeze.py.""" +@main.command(name='build-ci-image') +@click.option( + '--additional-extras', + help='This installs additional extra package while installing airflow in the image.', +) +@click.option('-p', '--python', help='Choose your python version') +@click.option( + '--additional-dev-apt-deps', help='Additional apt dev dependencies to use when building the images.' +) +@click.option( + '--additional-runtime-apt-deps', + help='Additional apt runtime dependencies to use when building the images.', +) +@click.option( + '--additional-python-deps', help='Additional python dependencies to use when building the images.' +) +@click.option( + '--additional_dev_apt_command', help='Additional command executed before dev apt deps are installed.' +) +@click.option( + '--additional_runtime_apt_command', + help='Additional command executed before runtime apt deps are installed.', +) +@click.option( + '--additional_dev_apt_env', help='Additional environment variables set when adding dev dependencies.' +) +@click.option( + '--additional_runtime_apt_env', + help='Additional environment variables set when adding runtime dependencies.', +) +@click.option('--dev-apt-command', help='The basic command executed before dev apt deps are installed.') +@click.option( + '--dev-apt-deps', + help='The basic apt dev dependencies to use when building the images.', +) +@click.option( + '--runtime-apt-command', help='The basic command executed before runtime apt deps are installed.' +) +@click.option( + '--runtime-apt-deps', + help='The basic apt runtime dependencies to use when building the images.', +) +@click.option('--github-repository', help='Choose repository to push/pull image.') +@click.option('--build-cache', help='Cache option') +@click.option('--upgrade-to-newer-dependencies', is_flag=True) +def build_ci_image( + verbose: bool, + additional_extras: Optional[str], + python: Optional[float], + additional_dev_apt_deps: Optional[str], + additional_runtime_apt_deps: Optional[str], + additional_python_deps: Optional[str], + additional_dev_apt_command: Optional[str], + additional_runtime_apt_command: Optional[str], + additional_dev_apt_env: Optional[str], + additional_runtime_apt_env: Optional[str], + dev_apt_command: Optional[str], + dev_apt_deps: Optional[str], + runtime_apt_command: Optional[str], + runtime_apt_deps: Optional[str], + github_repository: Optional[str], + build_cache: Optional[str], + upgrade_to_newer_dependencies: bool, +): + """Builds docker CI image without entering the container.""" + from airflow_breeze.ci.build_image import build_image + if verbose: console.print(f"\n[blue]Building image of airflow from {__AIRFLOW_SOURCES_ROOT}[/]\n") - raise ClickException("\nPlease implement building the CI image\n") + build_image( + verbose, + additional_extras=additional_extras, + python_version=python, + additional_dev_apt_deps=additional_dev_apt_deps, + additional_runtime_apt_deps=additional_runtime_apt_deps, + additional_python_deps=additional_python_deps, + additional_runtime_apt_command=additional_runtime_apt_command, + additional_dev_apt_command=additional_dev_apt_command, + additional_dev_apt_env=additional_dev_apt_env, + additional_runtime_apt_env=additional_runtime_apt_env, + dev_apt_command=dev_apt_command, + dev_apt_deps=dev_apt_deps, + runtime_apt_command=runtime_apt_command, + runtime_apt_deps=runtime_apt_deps, + github_repository=github_repository, + docker_cache=build_cache, + upgrade_to_newer_dependencies=upgrade_to_newer_dependencies, + ) + + +@option_verbose +@main.command(name='build-prod-image') +def build_prod_image(verbose: bool): + """Builds docker Production image without entering the container.""" + if verbose: + console.print("\n[blue]Building image[/]\n") + raise ClickException("\nPlease implement building the Production image\n") if __name__ == '__main__': Review comment: It's correct! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org